Expand description
Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
Structs§
- Breakpoint identifier. BreakpointId
- JavaScript call frame. Array of call frames form the call stack. CallFrame
- Call frame identifier. CallFrameId
- Continues execution until specific location is reached. continueToLocation
- Continues execution until specific location is reached. continueToLocation
- Debug symbols available for a wasm script. DebugSymbols
- Disables debugger for given page. disable
- Disables debugger for given page. disable
- Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. enable
- Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. enable
- Evaluates expression on a given call frame. evaluateOnCallFrame
- Evaluates expression on a given call frame. evaluateOnCallFrame
- Fired when breakpoint is resolved to an actual script and location. breakpointResolved
- Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. paused
- Fired when the virtual machine resumed execution. resumed
- Fired when virtual machine fails to parse the script. scriptFailedToParse
- Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. scriptParsed
- Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. getPossibleBreakpoints
- Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. getPossibleBreakpoints
- Returns source for the script with given id. getScriptSource
- Returns source for the script with given id. getScriptSource
- Returns stack trace with given
stackTraceId
. getStackTrace - Returns stack trace with given
stackTraceId
. getStackTrace - Location in the source code. Location
- Location range within one script. LocationRange
- Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors. nextWasmDisassemblyChunk
- Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors. nextWasmDisassemblyChunk
- Stops on the next JavaScript statement. pause
- Stops on the next JavaScript statement. pause
- Removes JavaScript breakpoint. removeBreakpoint
- Removes JavaScript breakpoint. removeBreakpoint
- Restarts particular call frame from the beginning. The old, deprecated behavior of
restartFrame
is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame. - Restarts particular call frame from the beginning. The old, deprecated behavior of
restartFrame
is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame. - Resumes JavaScript execution. resume
- Resumes JavaScript execution. resume
- Scope description. Scope
- Location in the source code. ScriptPosition
- Searches for given string in script content. searchInContent
- Searches for given string in script content. searchInContent
- Search match for resource. SearchMatch
- Enables or disables async call stacks tracking. setAsyncCallStackDepth
- Enables or disables async call stacks tracking. setAsyncCallStackDepth
- 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. setBlackboxPatterns
- 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. setBlackboxPatterns
- 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. setBlackboxedRanges
- 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. setBlackboxedRanges
- 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 subsequentbreakpointResolved
events issued. This logical breakpoint will survive page reloads. setBreakpointByUrl - 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 subsequentbreakpointResolved
events issued. This logical breakpoint will survive page reloads. setBreakpointByUrl - Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint. setBreakpointOnFunctionCall
- Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint. setBreakpointOnFunctionCall
- Sets JavaScript breakpoint at a given location. setBreakpoint
- Sets JavaScript breakpoint at a given location. setBreakpoint
- Activates / deactivates all breakpoints on the page. setBreakpointsActive
- Activates / deactivates all breakpoints on the page. setBreakpointsActive
- Sets instrumentation breakpoint. setInstrumentationBreakpoint
- Sets instrumentation breakpoint. setInstrumentationBreakpoint
- Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is
none
. setPauseOnExceptions - Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is
none
. setPauseOnExceptions - Changes return value in top frame. Available only at return break position. setReturnValue
- Changes return value in top frame. Available only at return break position. setReturnValue
- Edits JavaScript source live.
- Edits JavaScript source live.
- Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). setSkipAllPauses
- Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). setSkipAllPauses
- Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. setVariableValue
- Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. setVariableValue
- Steps into the function call. stepInto
- Steps into the function call. stepInto
- Steps out of the function call. stepOut
- Steps out of the function call. stepOut
- Steps over the statement. stepOver
- Steps over the statement. stepOver
Enums§
- Type of the debug symbols.
- Pause reason.
- The
mode
parameter must be present and set to ‘StepInto’, otherwiserestartFrame
will error out. - Scope type.
- Enum of possible script languages.
- Instrumentation name.
- Pause on exceptions mode.
- Whether the operation was successful or not. Only
Ok
denotes a successful live edit while the other enum variants denote why the live edit failed.