Skip to main content

Module debugger

Module debugger 

Source
Expand description

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

Types, command parameters and event payloads for the Debugger domain. The method-name constants for the same domain are in crate::methods.

Structs§

BreakLocation
BreakpointResolvedEvent
Fired when breakpoint is resolved to an actual script and location. Deprecated in favor of resolvedBreakpoints in the scriptParsed event.
CallFrame
JavaScript call frame. Array of call frames form the call stack.
ContinueToLocationParams
Continues execution until specific location is reached.
DebugSymbols
Debug symbols available for a wasm script.
DisableParams
Disables debugger for given page.
DisassembleWasmModuleParams
Experimental: may change without notice.
DisassembleWasmModuleReturns
What Debugger.disassembleWasmModule answers with.
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.
EnableReturns
What Debugger.enable answers with.
EvaluateOnCallFrameParams
Evaluates expression on a given call frame.
EvaluateOnCallFrameReturns
What Debugger.evaluateOnCallFrame answers with.
GetPossibleBreakpointsParams
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
GetPossibleBreakpointsReturns
What Debugger.getPossibleBreakpoints answers with.
GetScriptSourceParams
Returns source for the script with given id.
GetScriptSourceReturns
What Debugger.getScriptSource answers with.
GetStackTraceParams
Returns stack trace with given stackTraceId.
GetStackTraceReturns
What Debugger.getStackTrace answers with.
GetWasmBytecodeParams
This command is deprecated. Use getScriptSource instead.
GetWasmBytecodeReturns
What Debugger.getWasmBytecode answers with.
Location
Location in the source code.
LocationRange
Location range within one script.
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.
NextWasmDisassemblyChunkReturns
What Debugger.nextWasmDisassemblyChunk answers with.
PauseOnAsyncCallParams
Deprecated in the protocol.
PauseParams
Stops on the next JavaScript statement.
PausedEvent
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
RemoveBreakpointParams
Removes JavaScript breakpoint.
ResolvedBreakpoint
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. To stay back-wards compatible, restartFrame now expects a mode parameter to be present. If the mode parameter is missing, restartFrame errors out. The various return values are deprecated and callFrames is always empty. Use the call frames from the Debugger#paused events instead, that fires once V8 pauses at the beginning of the restarted function.
RestartFrameReturns
What Debugger.restartFrame answers with.
ResumeParams
Resumes JavaScript execution.
ResumedEvent
Fired when the virtual machine resumed execution.
Scope
Scope description.
ScriptFailedToParseEvent
Fired when virtual machine fails to parse the script.
ScriptParsedEvent
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
ScriptPosition
Location in the source code.
SearchInContentParams
Searches for given string in script content.
SearchInContentReturns
What Debugger.searchInContent answers with.
SearchMatch
Search match for resource.
SetAsyncCallStackDepthParams
Enables or disables async call stacks tracking.
SetBlackboxExecutionContextsParams
Replace previous blackbox execution contexts with passed ones. Forces backend to skip stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by performing ‘step in’ several times, finally resorting to ‘step out’ if unsuccessful.
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.
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.
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.
SetBreakpointByUrlReturns
What Debugger.setBreakpointByUrl answers with.
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.
SetBreakpointOnFunctionCallReturns
What Debugger.setBreakpointOnFunctionCall answers with.
SetBreakpointParams
Sets JavaScript breakpoint at a given location.
SetBreakpointReturns
What Debugger.setBreakpoint answers with.
SetBreakpointsActiveParams
Activates / deactivates all breakpoints on the page.
SetInstrumentationBreakpointParams
Sets instrumentation breakpoint.
SetInstrumentationBreakpointReturns
What Debugger.setInstrumentationBreakpoint answers with.
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.
SetReturnValueParams
Changes return value in top frame. Available only at return break position.
SetScriptSourceParams
Live edit is no longer supported and this command always fails with a “no longer available” error.
SetScriptSourceReturns
What Debugger.setScriptSource answers with.
SetSkipAllPausesParams
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
SetVariableValueParams
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
StepIntoParams
Steps into the function call.
StepOutParams
Steps out of the function call.
StepOverParams
Steps over the statement.
WasmDisassemblyChunk
Experimental: may change without notice.

Enums§

BreakLocationType
The values type accepts on BreakLocation.
ContinueToLocationTargetCallFrames
The values targetCallFrames accepts on continueToLocation.
DebugSymbolsType
The values type accepts on DebugSymbols.
PausedReason
The values reason accepts on paused.
RestartFrameMode
The values mode accepts on restartFrame.
ScopeEmptyReason
The values emptyReason accepts on Scope.
ScopeType
The values type accepts on Scope.
ScriptLanguage
Enum of possible script languages.
SetInstrumentationBreakpointInstrumentation
The values instrumentation accepts on setInstrumentationBreakpoint.
SetPauseOnExceptionsState
The values state accepts on setPauseOnExceptions.
SetScriptSourceStatus
The values status accepts on setScriptSource.

Type Aliases§

BreakpointId
Breakpoint identifier.
CallFrameId
Call frame identifier.