Expand description
Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
Method names for the Debugger domain, for use with
CdpClient::call.
Constants§
- CONTINUE_
TO_ LOCATION - Continues execution until specific location is reached.
- DISABLE
- Disables debugger for given page.
- DISASSEMBLE_
WASM_ MODULE Debugger.disassembleWasmModule- 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.
- EVALUATE_
ON_ CALL_ FRAME - Evaluates expression on a given call frame.
- GET_
POSSIBLE_ BREAKPOINTS - Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
- GET_
SCRIPT_ SOURCE - Returns source for the script with given id.
- GET_
STACK_ TRACE - Returns stack trace with given
stackTraceId. - GET_
WASM_ BYTECODE - This command is deprecated. Use getScriptSource instead.
- NEXT_
WASM_ DISASSEMBLY_ CHUNK - 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.
- PAUSE
- Stops on the next JavaScript statement.
- PAUSE_
ON_ ASYNC_ CALL Debugger.pauseOnAsyncCall- REMOVE_
BREAKPOINT - Removes JavaScript breakpoint.
- RESTART_
FRAME - Restarts particular call frame from the beginning. The old, deprecated
behavior of
restartFrameis 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,restartFramenow expects amodeparameter to be present. If themodeparameter is missing,restartFrameerrors out. The various return values are deprecated andcallFramesis always empty. Use the call frames from theDebugger#pausedevents instead, that fires once V8 pauses at the beginning of the restarted function. - RESUME
- Resumes JavaScript execution.
- SEARCH_
IN_ CONTENT - Searches for given string in script content.
- SET_
ASYNC_ CALL_ STACK_ DEPTH - Enables or disables async call stacks tracking.
- SET_
BLACKBOXED_ RANGES - 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.
- SET_
BLACKBOX_ EXECUTION_ CONTEXTS - 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.
- SET_
BLACKBOX_ PATTERNS - 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.
- SET_
BREAKPOINT - Sets JavaScript breakpoint at a given location.
- SET_
BREAKPOINTS_ ACTIVE - Activates / deactivates all breakpoints on the page.
- SET_
BREAKPOINT_ BY_ URL - 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
locationsproperty. Further matching script parsing will result in subsequentbreakpointResolvedevents issued. This logical breakpoint will survive page reloads. - SET_
BREAKPOINT_ ON_ FUNCTION_ CALL - 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.
- SET_
INSTRUMENTATION_ BREAKPOINT - Sets instrumentation breakpoint.
- SET_
PAUSE_ ON_ EXCEPTIONS - 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. - SET_
RETURN_ VALUE - Changes return value in top frame. Available only at return break position.
- SET_
SCRIPT_ SOURCE - Edits JavaScript source live. In general, functions that are currently on
the stack can not be edited with a single exception: If the edited
function is the top-most stack frame and that is the only activation of
that function on the stack. In this case the live edit will be successful
and a
Debugger.restartFramefor the top-most function is automatically triggered. - SET_
SKIP_ ALL_ PAUSES - Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
- SET_
VARIABLE_ VALUE - Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
- STEP_
INTO - Steps into the function call.
- STEP_
OUT - Steps out of the function call.
- STEP_
OVER - Steps over the statement.