Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
(continue-to-location)
(continue-to-location {:as params :keys [location target-call-frames]})
(continue-to-location connection
{:as params :keys [location target-call-frames]})
Continues execution until specific location is reached.
Parameters map keys:
Key | Description |
---|---|
:location | Location to continue to. |
:target-call-frames | null (optional) |
Continues execution until specific location is reached. Parameters map keys: Key | Description --------------------|------------ :location | Location to continue to. :target-call-frames | null (optional)
(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})
Disables debugger for given page.
Disables debugger for given page.
(enable)
(enable {:as params :keys []})
(enable connection {:as params :keys []})
Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
(evaluate-on-call-frame)
(evaluate-on-call-frame {:as params
:keys [call-frame-id expression object-group
include-command-line-api silent return-by-value
generate-preview throw-on-side-effect]})
(evaluate-on-call-frame connection
{:as params
:keys [call-frame-id expression object-group
include-command-line-api silent return-by-value
generate-preview throw-on-side-effect]})
Evaluates expression on a given call frame.
Parameters map keys:
Key | Description |
---|---|
:call-frame-id | Call frame identifier to evaluate on. |
:expression | Expression to evaluate. |
:object-group | String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup ). (optional) |
:include-command-line-api | Specifies whether command line API should be available to the evaluated expression, defaults to false. (optional) |
:silent | In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. (optional) |
:return-by-value | Whether the result is expected to be a JSON object that should be sent by value. (optional) |
:generate-preview | Whether preview should be generated for the result. (optional) |
:throw-on-side-effect | Whether to throw an exception if side effect cannot be ruled out during evaluation. (optional) |
Return map keys:
Key | Description |
---|---|
:result | Object wrapper for the evaluation result. |
:exception-details | Exception details. (optional) |
Evaluates expression on a given call frame. Parameters map keys: Key | Description --------------------------|------------ :call-frame-id | Call frame identifier to evaluate on. :expression | Expression to evaluate. :object-group | String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`). (optional) :include-command-line-api | Specifies whether command line API should be available to the evaluated expression, defaults to false. (optional) :silent | In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. (optional) :return-by-value | Whether the result is expected to be a JSON object that should be sent by value. (optional) :generate-preview | Whether preview should be generated for the result. (optional) :throw-on-side-effect | Whether to throw an exception if side effect cannot be ruled out during evaluation. (optional) Return map keys: Key | Description -------------------|------------ :result | Object wrapper for the evaluation result. :exception-details | Exception details. (optional)
(get-possible-breakpoints)
(get-possible-breakpoints {:as params :keys [start end restrict-to-function]})
(get-possible-breakpoints connection
{:as params :keys [start end restrict-to-function]})
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
Parameters map keys:
Key | Description |
---|---|
:start | Start of range to search possible breakpoint locations in. |
:end | End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. (optional) |
:restrict-to-function | Only consider locations which are in the same (non-nested) function as start. (optional) |
Return map keys:
Key | Description |
---|---|
:locations | List of the possible breakpoint locations. |
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. Parameters map keys: Key | Description ----------------------|------------ :start | Start of range to search possible breakpoint locations in. :end | End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. (optional) :restrict-to-function | Only consider locations which are in the same (non-nested) function as start. (optional) Return map keys: Key | Description -----------|------------ :locations | List of the possible breakpoint locations.
(get-script-source)
(get-script-source {:as params :keys [script-id]})
(get-script-source connection {:as params :keys [script-id]})
Returns source for the script with given id.
Parameters map keys:
Key | Description |
---|---|
:script-id | Id of the script to get source for. |
Return map keys:
Key | Description |
---|---|
:script-source | Script source. |
Returns source for the script with given id. Parameters map keys: Key | Description -----------|------------ :script-id | Id of the script to get source for. Return map keys: Key | Description ---------------|------------ :script-source | Script source.
(pause)
(pause {:as params :keys []})
(pause connection {:as params :keys []})
Stops on the next JavaScript statement.
Stops on the next JavaScript statement.
(remove-breakpoint)
(remove-breakpoint {:as params :keys [breakpoint-id]})
(remove-breakpoint connection {:as params :keys [breakpoint-id]})
Removes JavaScript breakpoint.
Parameters map keys:
Key | Description |
---|---|
:breakpoint-id | null |
Removes JavaScript breakpoint. Parameters map keys: Key | Description ---------------|------------ :breakpoint-id | null
(restart-frame)
(restart-frame {:as params :keys [call-frame-id]})
(restart-frame connection {:as params :keys [call-frame-id]})
Restarts particular call frame from the beginning.
Parameters map keys:
Key | Description |
---|---|
:call-frame-id | Call frame identifier to evaluate on. |
Return map keys:
Key | Description |
---|---|
:call-frames | New stack trace. |
:async-stack-trace | Async stack trace, if any. (optional) |
Restarts particular call frame from the beginning. Parameters map keys: Key | Description ---------------|------------ :call-frame-id | Call frame identifier to evaluate on. Return map keys: Key | Description -------------------|------------ :call-frames | New stack trace. :async-stack-trace | Async stack trace, if any. (optional)
(resume)
(resume {:as params :keys []})
(resume connection {:as params :keys []})
Resumes JavaScript execution.
Resumes JavaScript execution.
(schedule-step-into-async)
(schedule-step-into-async {:as params :keys []})
(schedule-step-into-async connection {:as params :keys []})
Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
(search-in-content)
(search-in-content {:as params :keys [script-id query case-sensitive is-regex]})
(search-in-content connection
{:as params :keys [script-id query case-sensitive is-regex]})
Searches for given string in script content.
Parameters map keys:
Key | Description |
---|---|
:script-id | Id of the script to search in. |
:query | String to search for. |
:case-sensitive | If true, search is case sensitive. (optional) |
:is-regex | If true, treats string parameter as regex. (optional) |
Return map keys:
Key | Description |
---|---|
:result | List of search matches. |
Searches for given string in script content. Parameters map keys: Key | Description ----------------|------------ :script-id | Id of the script to search in. :query | String to search for. :case-sensitive | If true, search is case sensitive. (optional) :is-regex | If true, treats string parameter as regex. (optional) Return map keys: Key | Description --------|------------ :result | List of search matches.
(set-async-call-stack-depth)
(set-async-call-stack-depth {:as params :keys [max-depth]})
(set-async-call-stack-depth connection {:as params :keys [max-depth]})
Enables or disables async call stacks tracking.
Parameters map keys:
Key | Description |
---|---|
:max-depth | Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). |
Enables or disables async call stacks tracking. Parameters map keys: Key | Description -----------|------------ :max-depth | Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).
(set-blackbox-patterns)
(set-blackbox-patterns {:as params :keys [patterns]})
(set-blackbox-patterns connection {:as params :keys [patterns]})
Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
Parameters map keys:
Key | Description |
---|---|
:patterns | Array of regexps that will be used to check script url for blackbox state. |
Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Parameters map keys: Key | Description ----------|------------ :patterns | Array of regexps that will be used to check script url for blackbox state.
(set-blackboxed-ranges)
(set-blackboxed-ranges {:as params :keys [script-id positions]})
(set-blackboxed-ranges connection {:as params :keys [script-id positions]})
Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
Parameters map keys:
Key | Description |
---|---|
:script-id | Id of the script. |
:positions | null |
Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. Parameters map keys: Key | Description -----------|------------ :script-id | Id of the script. :positions | null
(set-breakpoint)
(set-breakpoint {:as params :keys [location condition]})
(set-breakpoint connection {:as params :keys [location condition]})
Sets JavaScript breakpoint at a given location.
Parameters map keys:
Key | Description |
---|---|
:location | Location to set breakpoint in. |
:condition | Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. (optional) |
Return map keys:
Key | Description |
---|---|
:breakpoint-id | Id of the created breakpoint for further reference. |
:actual-location | Location this breakpoint resolved into. |
Sets JavaScript breakpoint at a given location. Parameters map keys: Key | Description -----------|------------ :location | Location to set breakpoint in. :condition | Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. (optional) Return map keys: Key | Description -----------------|------------ :breakpoint-id | Id of the created breakpoint for further reference. :actual-location | Location this breakpoint resolved into.
(set-breakpoint-by-url)
(set-breakpoint-by-url
{:as params :keys [line-number url url-regex column-number condition]})
(set-breakpoint-by-url
connection
{:as params :keys [line-number url url-regex column-number condition]})
Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations
property. Further matching script parsing will result in subsequent breakpointResolved
events issued. This logical breakpoint will survive page reloads.
Parameters map keys:
Key | Description |
---|---|
:line-number | Line number to set breakpoint at. |
:url | URL of the resources to set breakpoint on. (optional) |
:url-regex | Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. (optional) |
:column-number | Offset in the line to set breakpoint at. (optional) |
:condition | Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. (optional) |
Return map keys:
Key | Description |
---|---|
:breakpoint-id | Id of the created breakpoint for further reference. |
:locations | List of the locations this breakpoint resolved into upon addition. |
Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in `locations` property. Further matching script parsing will result in subsequent `breakpointResolved` events issued. This logical breakpoint will survive page reloads. Parameters map keys: Key | Description ---------------|------------ :line-number | Line number to set breakpoint at. :url | URL of the resources to set breakpoint on. (optional) :url-regex | Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified. (optional) :column-number | Offset in the line to set breakpoint at. (optional) :condition | Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. (optional) Return map keys: Key | Description ---------------|------------ :breakpoint-id | Id of the created breakpoint for further reference. :locations | List of the locations this breakpoint resolved into upon addition.
(set-breakpoints-active)
(set-breakpoints-active {:as params :keys [active]})
(set-breakpoints-active connection {:as params :keys [active]})
Activates / deactivates all breakpoints on the page.
Parameters map keys:
Key | Description |
---|---|
:active | New value for breakpoints active state. |
Activates / deactivates all breakpoints on the page. Parameters map keys: Key | Description --------|------------ :active | New value for breakpoints active state.
(set-pause-on-exceptions)
(set-pause-on-exceptions {:as params :keys [state]})
(set-pause-on-exceptions connection {:as params :keys [state]})
Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none
.
Parameters map keys:
Key | Description |
---|---|
:state | Pause on exceptions mode. |
Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is `none`. Parameters map keys: Key | Description -------|------------ :state | Pause on exceptions mode.
(set-script-source)
(set-script-source {:as params :keys [script-id script-source dry-run]})
(set-script-source connection
{:as params :keys [script-id script-source dry-run]})
Edits JavaScript source live.
Parameters map keys:
Key | Description |
---|---|
:script-id | Id of the script to edit. |
:script-source | New content of the script. |
:dry-run | If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. (optional) |
Return map keys:
Key | Description |
---|---|
:call-frames | New stack trace in case editing has happened while VM was stopped. (optional) |
:stack-changed | Whether current call stack was modified after applying the changes. (optional) |
:async-stack-trace | Async stack trace, if any. (optional) |
:exception-details | Exception details if any. (optional) |
Edits JavaScript source live. Parameters map keys: Key | Description ---------------|------------ :script-id | Id of the script to edit. :script-source | New content of the script. :dry-run | If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. (optional) Return map keys: Key | Description -------------------|------------ :call-frames | New stack trace in case editing has happened while VM was stopped. (optional) :stack-changed | Whether current call stack was modified after applying the changes. (optional) :async-stack-trace | Async stack trace, if any. (optional) :exception-details | Exception details if any. (optional)
(set-skip-all-pauses)
(set-skip-all-pauses {:as params :keys [skip]})
(set-skip-all-pauses connection {:as params :keys [skip]})
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
Parameters map keys:
Key | Description |
---|---|
:skip | New value for skip pauses state. |
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). Parameters map keys: Key | Description ------|------------ :skip | New value for skip pauses state.
(set-variable-value)
(set-variable-value
{:as params :keys [scope-number variable-name new-value call-frame-id]})
(set-variable-value
connection
{:as params :keys [scope-number variable-name new-value call-frame-id]})
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
Parameters map keys:
Key | Description |
---|---|
:scope-number | 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. |
:variable-name | Variable name. |
:new-value | New variable value. |
:call-frame-id | Id of callframe that holds variable. |
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. Parameters map keys: Key | Description ---------------|------------ :scope-number | 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. :variable-name | Variable name. :new-value | New variable value. :call-frame-id | Id of callframe that holds variable.
(step-into)
(step-into {:as params :keys []})
(step-into connection {:as params :keys []})
Steps into the function call.
Steps into the function call.
(step-out)
(step-out {:as params :keys []})
(step-out connection {:as params :keys []})
Steps out of the function call.
Steps out of the function call.
(step-over)
(step-over {:as params :keys []})
(step-over connection {:as params :keys []})
Steps over the statement.
Steps over the statement.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close