Module debugger

Source
Expand description

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

Structs§

BreakLocation
BreakLocationBuilder
BreakpointId
Breakpoint identifier. BreakpointId
CallFrame
JavaScript call frame. Array of call frames form the call stack. CallFrame
CallFrameBuilder
CallFrameId
Call frame identifier. CallFrameId
ContinueToLocationParams
Continues execution until specific location is reached. continueToLocation
ContinueToLocationParamsBuilder
ContinueToLocationReturns
Continues execution until specific location is reached. continueToLocation
DebugSymbols
Debug symbols available for a wasm script. DebugSymbols
DebugSymbolsBuilder
DisableParams
Disables debugger for given page. disable
DisableReturns
Disables debugger for given page. disable
DisassembleWasmModuleParams
DisassembleWasmModuleParamsBuilder
DisassembleWasmModuleReturns
DisassembleWasmModuleReturnsBuilder
EnableParams
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
EnableParamsBuilder
EnableReturns
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
EnableReturnsBuilder
EvaluateOnCallFrameParams
Evaluates expression on a given call frame. evaluateOnCallFrame
EvaluateOnCallFrameParamsBuilder
EvaluateOnCallFrameReturns
Evaluates expression on a given call frame. evaluateOnCallFrame
EvaluateOnCallFrameReturnsBuilder
EventBreakpointResolved
Fired when breakpoint is resolved to an actual script and location. breakpointResolved
EventPaused
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. paused
EventResumed
Fired when the virtual machine resumed execution. resumed
EventScriptFailedToParse
Fired when virtual machine fails to parse the script. scriptFailedToParse
EventScriptParsed
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. scriptParsed
GetPossibleBreakpointsParams
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. getPossibleBreakpoints
GetPossibleBreakpointsParamsBuilder
GetPossibleBreakpointsReturns
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. getPossibleBreakpoints
GetPossibleBreakpointsReturnsBuilder
GetScriptSourceParams
Returns source for the script with given id. getScriptSource
GetScriptSourceParamsBuilder
GetScriptSourceReturns
Returns source for the script with given id. getScriptSource
GetScriptSourceReturnsBuilder
GetStackTraceParams
Returns stack trace with given stackTraceId. getStackTrace
GetStackTraceParamsBuilder
GetStackTraceReturns
Returns stack trace with given stackTraceId. getStackTrace
GetStackTraceReturnsBuilder
Location
Location in the source code. Location
LocationBuilder
LocationRange
Location range within one script. LocationRange
LocationRangeBuilder
NextWasmDisassemblyChunkParams
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
NextWasmDisassemblyChunkParamsBuilder
NextWasmDisassemblyChunkReturns
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
NextWasmDisassemblyChunkReturnsBuilder
PauseParams
Stops on the next JavaScript statement. pause
PauseReturns
Stops on the next JavaScript statement. pause
RemoveBreakpointParams
Removes JavaScript breakpoint. removeBreakpoint
RemoveBreakpointParamsBuilder
RemoveBreakpointReturns
Removes JavaScript breakpoint. removeBreakpoint
RestartFrameParams
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.
RestartFrameParamsBuilder
RestartFrameReturns
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.
ResumeParams
Resumes JavaScript execution. resume
ResumeParamsBuilder
ResumeReturns
Resumes JavaScript execution. resume
Scope
Scope description. Scope
ScopeBuilder
ScriptPosition
Location in the source code. ScriptPosition
ScriptPositionBuilder
SearchInContentParams
Searches for given string in script content. searchInContent
SearchInContentParamsBuilder
SearchInContentReturns
Searches for given string in script content. searchInContent
SearchInContentReturnsBuilder
SearchMatch
Search match for resource. SearchMatch
SearchMatchBuilder
SetAsyncCallStackDepthParams
Enables or disables async call stacks tracking. setAsyncCallStackDepth
SetAsyncCallStackDepthParamsBuilder
SetAsyncCallStackDepthReturns
Enables or disables async call stacks tracking. setAsyncCallStackDepth
SetBlackboxPatternsParams
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
SetBlackboxPatternsParamsBuilder
SetBlackboxPatternsReturns
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
SetBlackboxedRangesParams
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
SetBlackboxedRangesParamsBuilder
SetBlackboxedRangesReturns
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
SetBreakpointByUrlParams
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. setBreakpointByUrl
SetBreakpointByUrlParamsBuilder
SetBreakpointByUrlReturns
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. setBreakpointByUrl
SetBreakpointByUrlReturnsBuilder
SetBreakpointOnFunctionCallParams
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
SetBreakpointOnFunctionCallParamsBuilder
SetBreakpointOnFunctionCallReturns
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
SetBreakpointOnFunctionCallReturnsBuilder
SetBreakpointParams
Sets JavaScript breakpoint at a given location. setBreakpoint
SetBreakpointParamsBuilder
SetBreakpointReturns
Sets JavaScript breakpoint at a given location. setBreakpoint
SetBreakpointReturnsBuilder
SetBreakpointsActiveParams
Activates / deactivates all breakpoints on the page. setBreakpointsActive
SetBreakpointsActiveParamsBuilder
SetBreakpointsActiveReturns
Activates / deactivates all breakpoints on the page. setBreakpointsActive
SetInstrumentationBreakpointParams
Sets instrumentation breakpoint. setInstrumentationBreakpoint
SetInstrumentationBreakpointParamsBuilder
SetInstrumentationBreakpointReturns
Sets instrumentation breakpoint. setInstrumentationBreakpoint
SetInstrumentationBreakpointReturnsBuilder
SetPauseOnExceptionsParams
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
SetPauseOnExceptionsParamsBuilder
SetPauseOnExceptionsReturns
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
SetReturnValueParams
Changes return value in top frame. Available only at return break position. setReturnValue
SetReturnValueParamsBuilder
SetReturnValueReturns
Changes return value in top frame. Available only at return break position. setReturnValue
SetScriptSourceParams
Edits JavaScript source live.
SetScriptSourceParamsBuilder
SetScriptSourceReturns
Edits JavaScript source live.
SetScriptSourceReturnsBuilder
SetSkipAllPausesParams
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). setSkipAllPauses
SetSkipAllPausesParamsBuilder
SetSkipAllPausesReturns
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). setSkipAllPauses
SetVariableValueParams
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. setVariableValue
SetVariableValueParamsBuilder
SetVariableValueReturns
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. setVariableValue
StepIntoParams
Steps into the function call. stepInto
StepIntoParamsBuilder
StepIntoReturns
Steps into the function call. stepInto
StepOutParams
Steps out of the function call. stepOut
StepOutReturns
Steps out of the function call. stepOut
StepOverParams
Steps over the statement. stepOver
StepOverParamsBuilder
StepOverReturns
Steps over the statement. stepOver
WasmDisassemblyChunk
WasmDisassemblyChunkBuilder

Enums§

BreakLocationType
ContinueToLocationTargetCallFrames
DebugSymbolsType
Type of the debug symbols.
PausedReason
Pause reason.
RestartFrameMode
The mode parameter must be present and set to ‘StepInto’, otherwise restartFrame will error out.
ScopeType
Scope type.
ScriptLanguage
Enum of possible script languages.
SetInstrumentationBreakpointInstrumentation
Instrumentation name.
SetPauseOnExceptionsState
Pause on exceptions mode.
SetScriptSourceStatus
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.