Chrome Remote Interface v0.0.3 ChromeRemoteInterface.RPC.Debugger View Source

Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.

Link to this section Summary

Functions

Continues execution until specific location is reached

Disables debugger for given page

Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received

Evaluates expression on a given call frame

Returns possible locations for breakpoint. scriptId in start and end range locations should be the same

Returns source for the script with given id

Stops on the next JavaScript statement

Removes JavaScript breakpoint

Restarts particular call frame from the beginning

Resumes JavaScript execution

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

Searches for given string in script content

Enables or disables async call stacks tracking

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

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

Sets JavaScript breakpoint at a given location

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

Activates / deactivates all breakpoints on the page

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

Edits JavaScript source live

Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)

Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually

Steps into the function call

Steps out of the function call

Steps over the statement

Link to this section Functions

Link to this function continueToLocation(page_pid) View Source

Continues execution until specific location is reached.

Parameters: location - - Location to continue to.targetCallFrames - -

Link to this function continueToLocation(page_pid, parameters) View Source
Link to this function continueToLocation(page_pid, parameters, opts) View Source

Disables debugger for given page.

Parameters:

Link to this function disable(page_pid, parameters) View Source
Link to this function disable(page_pid, parameters, opts) View Source

Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

Parameters:

Link to this function enable(page_pid, parameters) View Source
Link to this function enable(page_pid, parameters, opts) View Source
Link to this function evaluateOnCallFrame(page_pid) View Source

Evaluates expression on a given call frame.

Parameters: callFrameId - - Call frame identifier to evaluate on.expression - - Expression to evaluate.objectGroup - - String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).includeCommandLineAPI - - Specifies whether command line API should be available to the evaluated expression, defaults to false.silent - - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.returnByValue - - Whether the result is expected to be a JSON object that should be sent by value.generatePreview - - Whether preview should be generated for the result.throwOnSideEffect - - Whether to throw an exception if side effect cannot be ruled out during evaluation.

Link to this function evaluateOnCallFrame(page_pid, parameters) View Source
Link to this function evaluateOnCallFrame(page_pid, parameters, opts) View Source
Link to this function getPossibleBreakpoints(page_pid) View Source

Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.

Parameters: 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.restrictToFunction - - Only consider locations which are in the same (non-nested) function as start.

Link to this function getPossibleBreakpoints(page_pid, parameters) View Source
Link to this function getPossibleBreakpoints(page_pid, parameters, opts) View Source
Link to this function getScriptSource(page_pid) View Source

Returns source for the script with given id.

Parameters: scriptId - - Id of the script to get source for.

Link to this function getScriptSource(page_pid, parameters) View Source
Link to this function getScriptSource(page_pid, parameters, opts) View Source

Stops on the next JavaScript statement.

Parameters:

Link to this function pause(page_pid, parameters) View Source
Link to this function pause(page_pid, parameters, opts) View Source
Link to this function removeBreakpoint(page_pid) View Source

Removes JavaScript breakpoint.

Parameters: breakpointId - -

Link to this function removeBreakpoint(page_pid, parameters) View Source
Link to this function removeBreakpoint(page_pid, parameters, opts) View Source

Restarts particular call frame from the beginning.

Parameters: callFrameId - - Call frame identifier to evaluate on.

Link to this function restartFrame(page_pid, parameters) View Source
Link to this function restartFrame(page_pid, parameters, opts) View Source

Resumes JavaScript execution.

Parameters:

Link to this function resume(page_pid, parameters) View Source
Link to this function resume(page_pid, parameters, opts) View Source
Link to this function scheduleStepIntoAsync(page_pid) View Source

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.

Parameters:

Link to this function scheduleStepIntoAsync(page_pid, parameters) View Source
Link to this function scheduleStepIntoAsync(page_pid, parameters, opts) View Source
Link to this function searchInContent(page_pid) View Source

Searches for given string in script content.

Parameters: scriptId - - Id of the script to search in.query - - String to search for.caseSensitive - - If true, search is case sensitive.isRegex - - If true, treats string parameter as regex.

Link to this function searchInContent(page_pid, parameters) View Source
Link to this function searchInContent(page_pid, parameters, opts) View Source
Link to this function setAsyncCallStackDepth(page_pid) View Source

Enables or disables async call stacks tracking.

Parameters: maxDepth - - Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).

Link to this function setAsyncCallStackDepth(page_pid, parameters) View Source
Link to this function setAsyncCallStackDepth(page_pid, parameters, opts) View Source
Link to this function setBlackboxPatterns(page_pid) View Source

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: patterns - - Array of regexps that will be used to check script url for blackbox state.

Link to this function setBlackboxPatterns(page_pid, parameters) View Source
Link to this function setBlackboxPatterns(page_pid, parameters, opts) View Source
Link to this function setBlackboxedRanges(page_pid) View Source

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: scriptId - - Id of the script.positions - -

Link to this function setBlackboxedRanges(page_pid, parameters) View Source
Link to this function setBlackboxedRanges(page_pid, parameters, opts) View Source

Sets JavaScript breakpoint at a given location.

Parameters: 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.

Link to this function setBreakpoint(page_pid, parameters) View Source
Link to this function setBreakpoint(page_pid, parameters, opts) View Source
Link to this function setBreakpointByUrl(page_pid) View Source

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: lineNumber - - Line number to set breakpoint at.url - - URL of the resources to set breakpoint on.urlRegex - - Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.columnNumber - - Offset in the line to set breakpoint at.condition - - Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.

Link to this function setBreakpointByUrl(page_pid, parameters) View Source
Link to this function setBreakpointByUrl(page_pid, parameters, opts) View Source
Link to this function setBreakpointsActive(page_pid) View Source

Activates / deactivates all breakpoints on the page.

Parameters: active - - New value for breakpoints active state.

Link to this function setBreakpointsActive(page_pid, parameters) View Source
Link to this function setBreakpointsActive(page_pid, parameters, opts) View Source
Link to this function setPauseOnExceptions(page_pid) View Source

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: state - - Pause on exceptions mode.

Link to this function setPauseOnExceptions(page_pid, parameters) View Source
Link to this function setPauseOnExceptions(page_pid, parameters, opts) View Source
Link to this function setScriptSource(page_pid) View Source

Edits JavaScript source live.

Parameters: scriptId - - Id of the script to edit.scriptSource - - New content of the script.dryRun - - If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.

Link to this function setScriptSource(page_pid, parameters) View Source
Link to this function setScriptSource(page_pid, parameters, opts) View Source
Link to this function setSkipAllPauses(page_pid) View Source

Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).

Parameters: skip - - New value for skip pauses state.

Link to this function setSkipAllPauses(page_pid, parameters) View Source
Link to this function setSkipAllPauses(page_pid, parameters, opts) View Source
Link to this function setVariableValue(page_pid) View Source

Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.

Parameters: scopeNumber - - 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.variableName - - Variable name.newValue - - New variable value.callFrameId - - Id of callframe that holds variable.

Link to this function setVariableValue(page_pid, parameters) View Source
Link to this function setVariableValue(page_pid, parameters, opts) View Source

Steps into the function call.

Parameters:

Link to this function stepInto(page_pid, parameters) View Source
Link to this function stepInto(page_pid, parameters, opts) View Source

Steps out of the function call.

Parameters:

Link to this function stepOut(page_pid, parameters) View Source
Link to this function stepOut(page_pid, parameters, opts) View Source

Steps over the statement.

Parameters:

Link to this function stepOver(page_pid, parameters) View Source
Link to this function stepOver(page_pid, parameters, opts) View Source