Expand description
Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
Structs§
- Break
Location - Break
Location Builder - Breakpoint
Id - Breakpoint identifier. BreakpointId
- Call
Frame - JavaScript call frame. Array of call frames form the call stack. CallFrame
- Call
Frame Builder - Call
Frame Id - Call frame identifier. CallFrameId
- Continue
ToLocation Params - Continues execution until specific location is reached. continueToLocation
- Continue
ToLocation Params Builder - Continue
ToLocation Returns - Continues execution until specific location is reached. continueToLocation
- Debug
Symbols - Debug symbols available for a wasm script. DebugSymbols
- Debug
Symbols Builder - Disable
Params - Disables debugger for given page. disable
- Disable
Returns - Disables debugger for given page. disable
- Disassemble
Wasm Module Params - Disassemble
Wasm Module Params Builder - Disassemble
Wasm Module Returns - Disassemble
Wasm Module Returns Builder - Enable
Params - 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
- Enable
Params Builder - Enable
Returns - 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
- Enable
Returns Builder - Evaluate
OnCall Frame Params - Evaluates expression on a given call frame. evaluateOnCallFrame
- Evaluate
OnCall Frame Params Builder - Evaluate
OnCall Frame Returns - Evaluates expression on a given call frame. evaluateOnCallFrame
- Evaluate
OnCall Frame Returns Builder - Event
Breakpoint Resolved - Fired when breakpoint is resolved to an actual script and location. breakpointResolved
- Event
Paused - Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. paused
- Event
Resumed - Fired when the virtual machine resumed execution. resumed
- Event
Script Failed ToParse - Fired when virtual machine fails to parse the script. scriptFailedToParse
- Event
Script Parsed - Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. scriptParsed
- GetPossible
Breakpoints Params - Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. getPossibleBreakpoints
- GetPossible
Breakpoints Params Builder - GetPossible
Breakpoints Returns - Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. getPossibleBreakpoints
- GetPossible
Breakpoints Returns Builder - GetScript
Source Params - Returns source for the script with given id. getScriptSource
- GetScript
Source Params Builder - GetScript
Source Returns - Returns source for the script with given id. getScriptSource
- GetScript
Source Returns Builder - GetStack
Trace Params - Returns stack trace with given
stackTraceId
. getStackTrace - GetStack
Trace Params Builder - GetStack
Trace Returns - Returns stack trace with given
stackTraceId
. getStackTrace - GetStack
Trace Returns Builder - Location
- Location in the source code. Location
- Location
Builder - Location
Range - Location range within one script. LocationRange
- Location
Range Builder - Next
Wasm Disassembly Chunk Params - 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
- Next
Wasm Disassembly Chunk Params Builder - Next
Wasm Disassembly Chunk Returns - 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
- Next
Wasm Disassembly Chunk Returns Builder - Pause
Params - Stops on the next JavaScript statement. pause
- Pause
Returns - Stops on the next JavaScript statement. pause
- Remove
Breakpoint Params - Removes JavaScript breakpoint. removeBreakpoint
- Remove
Breakpoint Params Builder - Remove
Breakpoint Returns - Removes JavaScript breakpoint. removeBreakpoint
- Restart
Frame Params - 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. - Restart
Frame Params Builder - Restart
Frame Returns - 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. - Resume
Params - Resumes JavaScript execution. resume
- Resume
Params Builder - Resume
Returns - Resumes JavaScript execution. resume
- Scope
- Scope description. Scope
- Scope
Builder - Script
Position - Location in the source code. ScriptPosition
- Script
Position Builder - Search
InContent Params - Searches for given string in script content. searchInContent
- Search
InContent Params Builder - Search
InContent Returns - Searches for given string in script content. searchInContent
- Search
InContent Returns Builder - Search
Match - Search match for resource. SearchMatch
- Search
Match Builder - SetAsync
Call Stack Depth Params - Enables or disables async call stacks tracking. setAsyncCallStackDepth
- SetAsync
Call Stack Depth Params Builder - SetAsync
Call Stack Depth Returns - Enables or disables async call stacks tracking. setAsyncCallStackDepth
- SetBlackbox
Patterns Params - 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
- SetBlackbox
Patterns Params Builder - SetBlackbox
Patterns Returns - 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
- SetBlackboxed
Ranges Params - 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
- SetBlackboxed
Ranges Params Builder - SetBlackboxed
Ranges Returns - 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
- SetBreakpoint
ByUrl Params - 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 - SetBreakpoint
ByUrl Params Builder - SetBreakpoint
ByUrl Returns - 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 - SetBreakpoint
ByUrl Returns Builder - SetBreakpoint
OnFunction Call Params - 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
- SetBreakpoint
OnFunction Call Params Builder - SetBreakpoint
OnFunction Call Returns - 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
- SetBreakpoint
OnFunction Call Returns Builder - SetBreakpoint
Params - Sets JavaScript breakpoint at a given location. setBreakpoint
- SetBreakpoint
Params Builder - SetBreakpoint
Returns - Sets JavaScript breakpoint at a given location. setBreakpoint
- SetBreakpoint
Returns Builder - SetBreakpoints
Active Params - Activates / deactivates all breakpoints on the page. setBreakpointsActive
- SetBreakpoints
Active Params Builder - SetBreakpoints
Active Returns - Activates / deactivates all breakpoints on the page. setBreakpointsActive
- SetInstrumentation
Breakpoint Params - Sets instrumentation breakpoint. setInstrumentationBreakpoint
- SetInstrumentation
Breakpoint Params Builder - SetInstrumentation
Breakpoint Returns - Sets instrumentation breakpoint. setInstrumentationBreakpoint
- SetInstrumentation
Breakpoint Returns Builder - SetPause
OnExceptions Params - 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 - SetPause
OnExceptions Params Builder - SetPause
OnExceptions Returns - 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 - SetReturn
Value Params - Changes return value in top frame. Available only at return break position. setReturnValue
- SetReturn
Value Params Builder - SetReturn
Value Returns - Changes return value in top frame. Available only at return break position. setReturnValue
- SetScript
Source Params - Edits JavaScript source live.
- SetScript
Source Params Builder - SetScript
Source Returns - Edits JavaScript source live.
- SetScript
Source Returns Builder - SetSkip
AllPauses Params - Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). setSkipAllPauses
- SetSkip
AllPauses Params Builder - SetSkip
AllPauses Returns - Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). setSkipAllPauses
- SetVariable
Value Params - Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. setVariableValue
- SetVariable
Value Params Builder - SetVariable
Value Returns - Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. setVariableValue
- Step
Into Params - Steps into the function call. stepInto
- Step
Into Params Builder - Step
Into Returns - Steps into the function call. stepInto
- Step
OutParams - Steps out of the function call. stepOut
- Step
OutReturns - Steps out of the function call. stepOut
- Step
Over Params - Steps over the statement. stepOver
- Step
Over Params Builder - Step
Over Returns - Steps over the statement. stepOver
- Wasm
Disassembly Chunk - Wasm
Disassembly Chunk Builder
Enums§
- Break
Location Type - Continue
ToLocation Target Call Frames - Debug
Symbols Type - Type of the debug symbols.
- Paused
Reason - Pause reason.
- Restart
Frame Mode - The
mode
parameter must be present and set to ‘StepInto’, otherwiserestartFrame
will error out. - Scope
Type - Scope type.
- Script
Language - Enum of possible script languages.
- SetInstrumentation
Breakpoint Instrumentation - Instrumentation name.
- SetPause
OnExceptions State - Pause on exceptions mode.
- SetScript
Source Status - 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.