-
public final class DebuggerDomainDebugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
-
-
Method Summary
Modifier and Type Method Description final Flow<DebuggerEvent>events()Subscribes to all events related to this domain. final Flow<DebuggerEvent.BreakpointResolvedEvent>breakpointResolved()Fired when breakpoint is resolved to an actual script and location. final Flow<DebuggerEvent.PausedEvent>paused()Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. final Flow<DebuggerEvent.ResumedEvent>resumed()Fired when the virtual machine resumed execution. final Flow<DebuggerEvent.ScriptFailedToParseEvent>scriptFailedToParse()Fired when virtual machine fails to parse the script. final Flow<DebuggerEvent.ScriptParsedEvent>scriptParsed()Fired when virtual machine parses script. final UnitcontinueToLocation(ContinueToLocationRequest input)Continues execution until specific location is reached. final Unitdisable()Disables debugger for given page. final EnableResponseenable(EnableRequest input)Enables debugger for the given page. final EvaluateOnCallFrameResponseevaluateOnCallFrame(EvaluateOnCallFrameRequest input)Evaluates expression on a given call frame. final ExecuteWasmEvaluatorResponseexecuteWasmEvaluator(ExecuteWasmEvaluatorRequest input)Execute a Wasm Evaluator module on a given call frame. final GetPossibleBreakpointsResponsegetPossibleBreakpoints(GetPossibleBreakpointsRequest input)Returns possible locations for breakpoint. final GetScriptSourceResponsegetScriptSource(GetScriptSourceRequest input)Returns source for the script with given id. final GetWasmBytecodeResponsegetWasmBytecode(GetWasmBytecodeRequest input)This command is deprecated. final GetStackTraceResponsegetStackTrace(GetStackTraceRequest input)Returns stack trace with given stackTraceId.final Unitpause()Stops on the next JavaScript statement. final UnitpauseOnAsyncCall(PauseOnAsyncCallRequest input)Official doc final UnitremoveBreakpoint(RemoveBreakpointRequest input)Removes JavaScript breakpoint. final RestartFrameResponserestartFrame(RestartFrameRequest input)Restarts particular call frame from the beginning. final Unitresume(ResumeRequest input)Resumes JavaScript execution. final SearchInContentResponsesearchInContent(SearchInContentRequest input)Searches for given string in script content. final UnitsetAsyncCallStackDepth(SetAsyncCallStackDepthRequest input)Enables or disables async call stacks tracking. final UnitsetBlackboxPatterns(SetBlackboxPatternsRequest input)Replace previous blackbox patterns with passed ones. final UnitsetBlackboxedRanges(SetBlackboxedRangesRequest input)Makes backend skip steps in the script in blackboxed ranges. final SetBreakpointResponsesetBreakpoint(SetBreakpointRequest input)Sets JavaScript breakpoint at a given location. final SetInstrumentationBreakpointResponsesetInstrumentationBreakpoint(SetInstrumentationBreakpointRequest input)Sets instrumentation breakpoint. final SetBreakpointByUrlResponsesetBreakpointByUrl(SetBreakpointByUrlRequest input)Sets JavaScript breakpoint at given location specified either by URL or URL regex. final SetBreakpointOnFunctionCallResponsesetBreakpointOnFunctionCall(SetBreakpointOnFunctionCallRequest input)Sets JavaScript breakpoint before each call to the given function. final UnitsetBreakpointsActive(SetBreakpointsActiveRequest input)Activates / deactivates all breakpoints on the page. final UnitsetPauseOnExceptions(SetPauseOnExceptionsRequest input)Defines pause on exceptions state. final UnitsetReturnValue(SetReturnValueRequest input)Changes return value in top frame. final SetScriptSourceResponsesetScriptSource(SetScriptSourceRequest input)Edits JavaScript source live. final UnitsetSkipAllPauses(SetSkipAllPausesRequest input)Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). final UnitsetVariableValue(SetVariableValueRequest input)Changes value of variable in a callframe. final UnitstepInto(StepIntoRequest input)Steps into the function call. final UnitstepOut()Steps out of the function call. final UnitstepOver(StepOverRequest input)Steps over the statement. -
-
Method Detail
-
events
final Flow<DebuggerEvent> events()
Subscribes to all events related to this domain.
-
breakpointResolved
final Flow<DebuggerEvent.BreakpointResolvedEvent> breakpointResolved()
Fired when breakpoint is resolved to an actual script and location.
-
paused
final Flow<DebuggerEvent.PausedEvent> paused()
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
-
resumed
final Flow<DebuggerEvent.ResumedEvent> resumed()
Fired when the virtual machine resumed execution.
-
scriptFailedToParse
final Flow<DebuggerEvent.ScriptFailedToParseEvent> scriptFailedToParse()
Fired when virtual machine fails to parse the script.
-
scriptParsed
final Flow<DebuggerEvent.ScriptParsedEvent> scriptParsed()
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
-
continueToLocation
final Unit continueToLocation(ContinueToLocationRequest input)
Continues execution until specific location is reached.
-
enable
final EnableResponse enable(EnableRequest input)
Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
-
evaluateOnCallFrame
final EvaluateOnCallFrameResponse evaluateOnCallFrame(EvaluateOnCallFrameRequest input)
Evaluates expression on a given call frame.
-
executeWasmEvaluator
final ExecuteWasmEvaluatorResponse executeWasmEvaluator(ExecuteWasmEvaluatorRequest input)
Execute a Wasm Evaluator module on a given call frame.
-
getPossibleBreakpoints
final GetPossibleBreakpointsResponse getPossibleBreakpoints(GetPossibleBreakpointsRequest input)
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
-
getScriptSource
final GetScriptSourceResponse getScriptSource(GetScriptSourceRequest input)
Returns source for the script with given id.
-
getWasmBytecode
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final GetWasmBytecodeResponse getWasmBytecode(GetWasmBytecodeRequest input)
This command is deprecated. Use getScriptSource instead.
-
getStackTrace
final GetStackTraceResponse getStackTrace(GetStackTraceRequest input)
Returns stack trace with given
stackTraceId.
-
pauseOnAsyncCall
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit pauseOnAsyncCall(PauseOnAsyncCallRequest input)
-
removeBreakpoint
final Unit removeBreakpoint(RemoveBreakpointRequest input)
Removes JavaScript breakpoint.
-
restartFrame
final RestartFrameResponse restartFrame(RestartFrameRequest input)
Restarts particular call frame from the beginning.
-
resume
final Unit resume(ResumeRequest input)
Resumes JavaScript execution.
-
searchInContent
final SearchInContentResponse searchInContent(SearchInContentRequest input)
Searches for given string in script content.
-
setAsyncCallStackDepth
final Unit setAsyncCallStackDepth(SetAsyncCallStackDepthRequest input)
Enables or disables async call stacks tracking.
-
setBlackboxPatterns
final Unit setBlackboxPatterns(SetBlackboxPatternsRequest input)
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.
-
setBlackboxedRanges
final Unit setBlackboxedRanges(SetBlackboxedRangesRequest input)
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.
-
setBreakpoint
final SetBreakpointResponse setBreakpoint(SetBreakpointRequest input)
Sets JavaScript breakpoint at a given location.
-
setInstrumentationBreakpoint
final SetInstrumentationBreakpointResponse setInstrumentationBreakpoint(SetInstrumentationBreakpointRequest input)
Sets instrumentation breakpoint.
-
setBreakpointByUrl
final SetBreakpointByUrlResponse setBreakpointByUrl(SetBreakpointByUrlRequest input)
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.
-
setBreakpointOnFunctionCall
final SetBreakpointOnFunctionCallResponse setBreakpointOnFunctionCall(SetBreakpointOnFunctionCallRequest input)
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.
-
setBreakpointsActive
final Unit setBreakpointsActive(SetBreakpointsActiveRequest input)
Activates / deactivates all breakpoints on the page.
-
setPauseOnExceptions
final Unit setPauseOnExceptions(SetPauseOnExceptionsRequest input)
Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is
none.
-
setReturnValue
final Unit setReturnValue(SetReturnValueRequest input)
Changes return value in top frame. Available only at return break position.
-
setScriptSource
final SetScriptSourceResponse setScriptSource(SetScriptSourceRequest input)
Edits JavaScript source live.
-
setSkipAllPauses
final Unit setSkipAllPauses(SetSkipAllPausesRequest input)
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
-
setVariableValue
final Unit setVariableValue(SetVariableValueRequest input)
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
-
stepInto
final Unit stepInto(StepIntoRequest input)
Steps into the function call.
-
stepOver
final Unit stepOver(StepOverRequest input)
Steps over the statement.
-
-
-
-