Debugger
Types
Fired when breakpoint is resolved to an actual script and location. Deprecated in favor of resolvedBreakpoints
in the scriptParsed
event.
JavaScript call frame. Array of call frames form the call stack.
Debug symbols available for a wasm script.
Location range within one script.
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Scope description.
Fired when virtual machine fails to parse the script.
Enum of possible script languages.
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Location in the source code.
Search match for resource.
Properties
Fired when breakpoint is resolved to an actual script and location. Deprecated in favor of resolvedBreakpoints
in the scriptParsed
event.
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Fired when virtual machine fails to parse the script.
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Functions
Continues execution until specific location is reached.
Disables debugger for given page.
Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
Evaluates expression on a given call frame.
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
Returns source for the script with given id.
Returns stack trace with given stackTraceId
.
This command is deprecated. Use getScriptSource instead.
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.
Stops on the next JavaScript statement.
Removes JavaScript breakpoint.
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.
Searches for given string in script content.
Enables or disables async call stacks tracking.
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.
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.
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.
Sets JavaScript breakpoint at a given location.
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.
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.
Activates / deactivates all breakpoints on the page.
Sets instrumentation breakpoint.
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
.
Changes return value in top frame. Available only at return break position.
Edits JavaScript source live.
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
Steps into the function call.
Steps out of the function call.
Steps over the statement.