pl.wendigo.chrome.api.debugger / DebuggerOperations

DebuggerOperations

class DebuggerOperations (source)

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

Link
Protocol Debugger domain documentation.

Functions

breakpointResolved

fun breakpointResolved(): Flowable<BreakpointResolvedEvent>

Fired when breakpoint is resolved to an actual script and location.

breakpointResolvedTimed

fun breakpointResolvedTimed(): Flowable<Timed<BreakpointResolvedEvent>>

Fired when breakpoint is resolved to an actual script and location.

continueToLocation

fun continueToLocation(input: ContinueToLocationRequest): Single<ResponseFrame>

Continues execution until specific location is reached.

disable

fun disable(): Single<ResponseFrame>

Disables debugger for given page.

enable

fun enable(): Single<ResponseFrame>

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

fun evaluateOnCallFrame(input: EvaluateOnCallFrameRequest): Single<EvaluateOnCallFrameResponse>

Evaluates expression on a given call frame.

events

fun events(): Flowable<Event>

Returns flowable capturing all Debugger domains events.

getScriptSource

fun getScriptSource(input: GetScriptSourceRequest): Single<GetScriptSourceResponse>

Returns source for the script with given id.

pause

fun pause(): Single<ResponseFrame>

Stops on the next JavaScript statement.

paused

fun paused(): Flowable<PausedEvent>

Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.

pausedTimed

fun pausedTimed(): Flowable<Timed<PausedEvent>>

Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.

removeBreakpoint

fun removeBreakpoint(input: RemoveBreakpointRequest): Single<ResponseFrame>

Removes JavaScript breakpoint.

restartFrame

fun restartFrame(input: RestartFrameRequest): Single<RestartFrameResponse>

Restarts particular call frame from the beginning.

resume

fun resume(): Single<ResponseFrame>

Resumes JavaScript execution.

resumed

fun resumed(): Flowable<Event>

Fired when the virtual machine resumed execution.

resumedTimed

fun resumedTimed(): Flowable<Timed<Event>>

Fired when the virtual machine resumed execution.

scriptFailedToParse

fun scriptFailedToParse(): Flowable<ScriptFailedToParseEvent>

Fired when virtual machine fails to parse the script.

scriptFailedToParseTimed

fun scriptFailedToParseTimed(): Flowable<Timed<ScriptFailedToParseEvent>>

Fired when virtual machine fails to parse the script.

scriptParsed

fun scriptParsed(): Flowable<ScriptParsedEvent>

Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.

scriptParsedTimed

fun scriptParsedTimed(): Flowable<Timed<ScriptParsedEvent>>

Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.

searchInContent

fun searchInContent(input: SearchInContentRequest): Single<SearchInContentResponse>

Searches for given string in script content.

setAsyncCallStackDepth

fun setAsyncCallStackDepth(input: SetAsyncCallStackDepthRequest): Single<ResponseFrame>

Enables or disables async call stacks tracking.

setBlackboxedRanges

fun setBlackboxedRanges(input: SetBlackboxedRangesRequest): Single<ResponseFrame>

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.

setBlackboxPatterns

fun setBlackboxPatterns(input: SetBlackboxPatternsRequest): Single<ResponseFrame>

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.

setBreakpoint

fun setBreakpoint(input: SetBreakpointRequest): Single<SetBreakpointResponse>

Sets JavaScript breakpoint at a given location.

setBreakpointByUrl

fun setBreakpointByUrl(input: SetBreakpointByUrlRequest): Single<SetBreakpointByUrlResponse>

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.

setBreakpointsActive

fun setBreakpointsActive(input: SetBreakpointsActiveRequest): Single<ResponseFrame>

Activates / deactivates all breakpoints on the page.

setPauseOnExceptions

fun setPauseOnExceptions(input: SetPauseOnExceptionsRequest): Single<ResponseFrame>

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.

setScriptSource

fun setScriptSource(input: SetScriptSourceRequest): Single<SetScriptSourceResponse>

Edits JavaScript source live.

setSkipAllPauses

fun setSkipAllPauses(input: SetSkipAllPausesRequest): Single<ResponseFrame>

Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).

setVariableValue

fun setVariableValue(input: SetVariableValueRequest): Single<ResponseFrame>

Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.

stepInto

fun stepInto(): Single<ResponseFrame>

Steps into the function call.

stepOut

fun stepOut(): Single<ResponseFrame>

Steps out of the function call.

stepOver

fun stepOver(): Single<ResponseFrame>

Steps over the statement.