Liking cljdoc? Tell your friends :D

clj-chrome-devtools.commands.debugger

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.
raw docstring

continue-to-locationclj

(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:

KeyDescription
:locationLocation to continue to.
:target-call-framesnull (optional)
Continues execution until specific location is reached.

Parameters map keys:


  Key                 | Description 
  --------------------|------------ 
  :location           | Location to continue to.
  :target-call-frames | null (optional)
sourceraw docstring

disableclj

(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})

Disables debugger for given page.

Disables debugger for given page.
sourceraw docstring

enableclj

(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.
sourceraw docstring

evaluate-on-call-frameclj

(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:

KeyDescription
:call-frame-idCall frame identifier to evaluate on.
:expressionExpression to evaluate.
:object-groupString object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). (optional)
:include-command-line-apiSpecifies whether command line API should be available to the evaluated expression, defaults to false. (optional)
:silentIn silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. (optional)
:return-by-valueWhether the result is expected to be a JSON object that should be sent by value. (optional)
:generate-previewWhether preview should be generated for the result. (optional)
:throw-on-side-effectWhether to throw an exception if side effect cannot be ruled out during evaluation. (optional)

Return map keys:

KeyDescription
:resultObject wrapper for the evaluation result.
:exception-detailsException 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)
sourceraw docstring

get-possible-breakpointsclj

(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:

KeyDescription
:startStart of range to search possible breakpoint locations in.
:endEnd of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. (optional)
:restrict-to-functionOnly consider locations which are in the same (non-nested) function as start. (optional)

Return map keys:

KeyDescription
:locationsList 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.
sourceraw docstring

get-script-sourceclj

(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:

KeyDescription
:script-idId of the script to get source for.

Return map keys:

KeyDescription
:script-sourceScript 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.
sourceraw docstring

pauseclj

(pause)
(pause {:as params :keys []})
(pause connection {:as params :keys []})

Stops on the next JavaScript statement.

Stops on the next JavaScript statement.
sourceraw docstring

remove-breakpointclj

(remove-breakpoint)
(remove-breakpoint {:as params :keys [breakpoint-id]})
(remove-breakpoint connection {:as params :keys [breakpoint-id]})

Removes JavaScript breakpoint.

Parameters map keys:

KeyDescription
:breakpoint-idnull
Removes JavaScript breakpoint.

Parameters map keys:


  Key            | Description 
  ---------------|------------ 
  :breakpoint-id | null
sourceraw docstring

restart-frameclj

(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:

KeyDescription
:call-frame-idCall frame identifier to evaluate on.

Return map keys:

KeyDescription
:call-framesNew stack trace.
:async-stack-traceAsync 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)
sourceraw docstring

resumeclj

(resume)
(resume {:as params :keys []})
(resume connection {:as params :keys []})

Resumes JavaScript execution.

Resumes JavaScript execution.
sourceraw docstring

schedule-step-into-asyncclj

(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.
sourceraw docstring

search-in-contentclj

(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:

KeyDescription
:script-idId of the script to search in.
:queryString to search for.
:case-sensitiveIf true, search is case sensitive. (optional)
:is-regexIf true, treats string parameter as regex. (optional)

Return map keys:

KeyDescription
:resultList 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.
sourceraw docstring

set-async-call-stack-depthclj

(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:

KeyDescription
:max-depthMaximum 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).
sourceraw docstring

set-blackbox-patternsclj

(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:

KeyDescription
:patternsArray 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.
sourceraw docstring

set-blackboxed-rangesclj

(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:

KeyDescription
:script-idId of the script.
:positionsnull
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
sourceraw docstring

set-breakpointclj

(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:

KeyDescription
:locationLocation to set breakpoint in.
:conditionExpression 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:

KeyDescription
:breakpoint-idId of the created breakpoint for further reference.
:actual-locationLocation 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.
sourceraw docstring

set-breakpoint-by-urlclj

(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:

KeyDescription
:line-numberLine number to set breakpoint at.
:urlURL of the resources to set breakpoint on. (optional)
:url-regexRegex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. (optional)
:column-numberOffset in the line to set breakpoint at. (optional)
:conditionExpression 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:

KeyDescription
:breakpoint-idId of the created breakpoint for further reference.
:locationsList 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.
sourceraw docstring

set-breakpoints-activeclj

(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:

KeyDescription
:activeNew value for breakpoints active state.
Activates / deactivates all breakpoints on the page.

Parameters map keys:


  Key     | Description 
  --------|------------ 
  :active | New value for breakpoints active state.
sourceraw docstring

set-pause-on-exceptionsclj

(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:

KeyDescription
:statePause 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.
sourceraw docstring

set-script-sourceclj

(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:

KeyDescription
:script-idId of the script to edit.
:script-sourceNew content of the script.
:dry-runIf 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:

KeyDescription
:call-framesNew stack trace in case editing has happened while VM was stopped. (optional)
:stack-changedWhether current call stack was modified after applying the changes. (optional)
:async-stack-traceAsync stack trace, if any. (optional)
:exception-detailsException 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)
sourceraw docstring

set-skip-all-pausesclj

(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:

KeyDescription
:skipNew 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.
sourceraw docstring

set-variable-valueclj

(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:

KeyDescription
:scope-number0-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-nameVariable name.
:new-valueNew variable value.
:call-frame-idId 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.
sourceraw docstring

step-intoclj

(step-into)
(step-into {:as params :keys []})
(step-into connection {:as params :keys []})

Steps into the function call.

Steps into the function call.
sourceraw docstring

step-outclj

(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.
sourceraw docstring

step-overclj

(step-over)
(step-over {:as params :keys []})
(step-over connection {:as params :keys []})

Steps over the statement.

Steps over the statement.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close