Options
All
  • Public
  • Public/Protected
  • All
Menu

The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.

Hierarchy

Index

Constructors

constructor

  • Create a new instance of the inspector.Session class. The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.

    Returns Session

Properties

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: string, listener: function): this
  • addListener(event: "inspectorNotification", listener: function): this
  • addListener(event: "Console.messageAdded", listener: function): this
  • addListener(event: "Debugger.breakpointResolved", listener: function): this
  • addListener(event: "Debugger.paused", listener: function): this
  • addListener(event: "Debugger.resumed", listener: function): this
  • addListener(event: "Debugger.scriptFailedToParse", listener: function): this
  • addListener(event: "Debugger.scriptParsed", listener: function): this
  • addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: function): this
  • addListener(event: "HeapProfiler.heapStatsUpdate", listener: function): this
  • addListener(event: "HeapProfiler.lastSeenObjectId", listener: function): this
  • addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: function): this
  • addListener(event: "HeapProfiler.resetProfiles", listener: function): this
  • addListener(event: "Profiler.consoleProfileFinished", listener: function): this
  • addListener(event: "Profiler.consoleProfileStarted", listener: function): this
  • addListener(event: "Runtime.bindingCalled", listener: function): this
  • addListener(event: "Runtime.consoleAPICalled", listener: function): this
  • addListener(event: "Runtime.exceptionRevoked", listener: function): this
  • addListener(event: "Runtime.exceptionThrown", listener: function): this
  • addListener(event: "Runtime.executionContextCreated", listener: function): this
  • addListener(event: "Runtime.executionContextDestroyed", listener: function): this
  • addListener(event: "Runtime.executionContextsCleared", listener: function): this
  • addListener(event: "Runtime.inspectRequested", listener: function): this
  • addListener(event: "NodeTracing.dataCollected", listener: function): this
  • addListener(event: "NodeTracing.tracingComplete", listener: function): this
  • addListener(event: "NodeWorker.attachedToWorker", listener: function): this
  • addListener(event: "NodeWorker.detachedFromWorker", listener: function): this
  • addListener(event: "NodeWorker.receivedMessageFromWorker", listener: function): this

connect

  • connect(): void
  • Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port.

    Returns void

disconnect

  • disconnect(): void
  • Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.

    Returns void

emit

eventNames

  • eventNames(): Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

listenerCount

  • listenerCount(type: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string, listener: function): this
  • on(event: "inspectorNotification", listener: function): this
  • on(event: "Console.messageAdded", listener: function): this
  • on(event: "Debugger.breakpointResolved", listener: function): this
  • on(event: "Debugger.paused", listener: function): this
  • on(event: "Debugger.resumed", listener: function): this
  • on(event: "Debugger.scriptFailedToParse", listener: function): this
  • on(event: "Debugger.scriptParsed", listener: function): this
  • on(event: "HeapProfiler.addHeapSnapshotChunk", listener: function): this
  • on(event: "HeapProfiler.heapStatsUpdate", listener: function): this
  • on(event: "HeapProfiler.lastSeenObjectId", listener: function): this
  • on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: function): this
  • on(event: "HeapProfiler.resetProfiles", listener: function): this
  • on(event: "Profiler.consoleProfileFinished", listener: function): this
  • on(event: "Profiler.consoleProfileStarted", listener: function): this
  • on(event: "Runtime.bindingCalled", listener: function): this
  • on(event: "Runtime.consoleAPICalled", listener: function): this
  • on(event: "Runtime.exceptionRevoked", listener: function): this
  • on(event: "Runtime.exceptionThrown", listener: function): this
  • on(event: "Runtime.executionContextCreated", listener: function): this
  • on(event: "Runtime.executionContextDestroyed", listener: function): this
  • on(event: "Runtime.executionContextsCleared", listener: function): this
  • on(event: "Runtime.inspectRequested", listener: function): this
  • on(event: "NodeTracing.dataCollected", listener: function): this
  • on(event: "NodeTracing.tracingComplete", listener: function): this
  • on(event: "NodeWorker.attachedToWorker", listener: function): this
  • on(event: "NodeWorker.detachedFromWorker", listener: function): this
  • on(event: "NodeWorker.receivedMessageFromWorker", listener: function): this

once

  • once(event: string, listener: function): this
  • once(event: "inspectorNotification", listener: function): this
  • once(event: "Console.messageAdded", listener: function): this
  • once(event: "Debugger.breakpointResolved", listener: function): this
  • once(event: "Debugger.paused", listener: function): this
  • once(event: "Debugger.resumed", listener: function): this
  • once(event: "Debugger.scriptFailedToParse", listener: function): this
  • once(event: "Debugger.scriptParsed", listener: function): this
  • once(event: "HeapProfiler.addHeapSnapshotChunk", listener: function): this
  • once(event: "HeapProfiler.heapStatsUpdate", listener: function): this
  • once(event: "HeapProfiler.lastSeenObjectId", listener: function): this
  • once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: function): this
  • once(event: "HeapProfiler.resetProfiles", listener: function): this
  • once(event: "Profiler.consoleProfileFinished", listener: function): this
  • once(event: "Profiler.consoleProfileStarted", listener: function): this
  • once(event: "Runtime.bindingCalled", listener: function): this
  • once(event: "Runtime.consoleAPICalled", listener: function): this
  • once(event: "Runtime.exceptionRevoked", listener: function): this
  • once(event: "Runtime.exceptionThrown", listener: function): this
  • once(event: "Runtime.executionContextCreated", listener: function): this
  • once(event: "Runtime.executionContextDestroyed", listener: function): this
  • once(event: "Runtime.executionContextsCleared", listener: function): this
  • once(event: "Runtime.inspectRequested", listener: function): this
  • once(event: "NodeTracing.dataCollected", listener: function): this
  • once(event: "NodeTracing.tracingComplete", listener: function): this
  • once(event: "NodeWorker.attachedToWorker", listener: function): this
  • once(event: "NodeWorker.detachedFromWorker", listener: function): this
  • once(event: "NodeWorker.receivedMessageFromWorker", listener: function): this

post

  • post(method: string, params?: undefined | __type, callback?: undefined | function): void
  • post(method: string, callback?: undefined | function): void
  • post(method: "Console.clearMessages", callback?: undefined | function): void
  • post(method: "Console.disable", callback?: undefined | function): void
  • post(method: "Console.enable", callback?: undefined | function): void
  • post(method: "Debugger.continueToLocation", params?: ContinueToLocationParameterType, callback?: undefined | function): void
  • post(method: "Debugger.continueToLocation", callback?: undefined | function): void
  • post(method: "Debugger.disable", callback?: undefined | function): void
  • post(method: "Debugger.enable", callback?: undefined | function): void
  • post(method: "Debugger.evaluateOnCallFrame", params?: EvaluateOnCallFrameParameterType, callback?: undefined | function): void
  • post(method: "Debugger.evaluateOnCallFrame", callback?: undefined | function): void
  • post(method: "Debugger.getPossibleBreakpoints", params?: GetPossibleBreakpointsParameterType, callback?: undefined | function): void
  • post(method: "Debugger.getPossibleBreakpoints", callback?: undefined | function): void
  • post(method: "Debugger.getScriptSource", params?: GetScriptSourceParameterType, callback?: undefined | function): void
  • post(method: "Debugger.getScriptSource", callback?: undefined | function): void
  • post(method: "Debugger.getStackTrace", params?: GetStackTraceParameterType, callback?: undefined | function): void
  • post(method: "Debugger.getStackTrace", callback?: undefined | function): void
  • post(method: "Debugger.pause", callback?: undefined | function): void
  • post(method: "Debugger.pauseOnAsyncCall", params?: PauseOnAsyncCallParameterType, callback?: undefined | function): void
  • post(method: "Debugger.pauseOnAsyncCall", callback?: undefined | function): void
  • post(method: "Debugger.removeBreakpoint", params?: RemoveBreakpointParameterType, callback?: undefined | function): void
  • post(method: "Debugger.removeBreakpoint", callback?: undefined | function): void
  • post(method: "Debugger.restartFrame", params?: RestartFrameParameterType, callback?: undefined | function): void
  • post(method: "Debugger.restartFrame", callback?: undefined | function): void
  • post(method: "Debugger.resume", callback?: undefined | function): void
  • post(method: "Debugger.scheduleStepIntoAsync", callback?: undefined | function): void
  • post(method: "Debugger.searchInContent", params?: SearchInContentParameterType, callback?: undefined | function): void
  • post(method: "Debugger.searchInContent", callback?: undefined | function): void
  • post(method: "Debugger.setAsyncCallStackDepth", params?: SetAsyncCallStackDepthParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setAsyncCallStackDepth", callback?: undefined | function): void
  • post(method: "Debugger.setBlackboxPatterns", params?: SetBlackboxPatternsParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setBlackboxPatterns", callback?: undefined | function): void
  • post(method: "Debugger.setBlackboxedRanges", params?: SetBlackboxedRangesParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setBlackboxedRanges", callback?: undefined | function): void
  • post(method: "Debugger.setBreakpoint", params?: SetBreakpointParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setBreakpoint", callback?: undefined | function): void
  • post(method: "Debugger.setBreakpointByUrl", params?: SetBreakpointByUrlParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setBreakpointByUrl", callback?: undefined | function): void
  • post(method: "Debugger.setBreakpointOnFunctionCall", params?: SetBreakpointOnFunctionCallParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setBreakpointOnFunctionCall", callback?: undefined | function): void
  • post(method: "Debugger.setBreakpointsActive", params?: SetBreakpointsActiveParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setBreakpointsActive", callback?: undefined | function): void
  • post(method: "Debugger.setPauseOnExceptions", params?: SetPauseOnExceptionsParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setPauseOnExceptions", callback?: undefined | function): void
  • post(method: "Debugger.setReturnValue", params?: SetReturnValueParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setReturnValue", callback?: undefined | function): void
  • post(method: "Debugger.setScriptSource", params?: SetScriptSourceParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setScriptSource", callback?: undefined | function): void
  • post(method: "Debugger.setSkipAllPauses", params?: SetSkipAllPausesParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setSkipAllPauses", callback?: undefined | function): void
  • post(method: "Debugger.setVariableValue", params?: SetVariableValueParameterType, callback?: undefined | function): void
  • post(method: "Debugger.setVariableValue", callback?: undefined | function): void
  • post(method: "Debugger.stepInto", params?: StepIntoParameterType, callback?: undefined | function): void
  • post(method: "Debugger.stepInto", callback?: undefined | function): void
  • post(method: "Debugger.stepOut", callback?: undefined | function): void
  • post(method: "Debugger.stepOver", callback?: undefined | function): void
  • post(method: "HeapProfiler.addInspectedHeapObject", params?: AddInspectedHeapObjectParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.addInspectedHeapObject", callback?: undefined | function): void
  • post(method: "HeapProfiler.collectGarbage", callback?: undefined | function): void
  • post(method: "HeapProfiler.disable", callback?: undefined | function): void
  • post(method: "HeapProfiler.enable", callback?: undefined | function): void
  • post(method: "HeapProfiler.getHeapObjectId", params?: GetHeapObjectIdParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.getHeapObjectId", callback?: undefined | function): void
  • post(method: "HeapProfiler.getObjectByHeapObjectId", params?: GetObjectByHeapObjectIdParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: undefined | function): void
  • post(method: "HeapProfiler.getSamplingProfile", callback?: undefined | function): void
  • post(method: "HeapProfiler.startSampling", params?: StartSamplingParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.startSampling", callback?: undefined | function): void
  • post(method: "HeapProfiler.startTrackingHeapObjects", params?: StartTrackingHeapObjectsParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.startTrackingHeapObjects", callback?: undefined | function): void
  • post(method: "HeapProfiler.stopSampling", callback?: undefined | function): void
  • post(method: "HeapProfiler.stopTrackingHeapObjects", params?: StopTrackingHeapObjectsParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: undefined | function): void
  • post(method: "HeapProfiler.takeHeapSnapshot", params?: TakeHeapSnapshotParameterType, callback?: undefined | function): void
  • post(method: "HeapProfiler.takeHeapSnapshot", callback?: undefined | function): void
  • post(method: "Profiler.disable", callback?: undefined | function): void
  • post(method: "Profiler.enable", callback?: undefined | function): void
  • post(method: "Profiler.getBestEffortCoverage", callback?: undefined | function): void
  • post(method: "Profiler.setSamplingInterval", params?: SetSamplingIntervalParameterType, callback?: undefined | function): void
  • post(method: "Profiler.setSamplingInterval", callback?: undefined | function): void
  • post(method: "Profiler.start", callback?: undefined | function): void
  • post(method: "Profiler.startPreciseCoverage", params?: StartPreciseCoverageParameterType, callback?: undefined | function): void
  • post(method: "Profiler.startPreciseCoverage", callback?: undefined | function): void
  • post(method: "Profiler.startTypeProfile", callback?: undefined | function): void
  • post(method: "Profiler.stop", callback?: undefined | function): void
  • post(method: "Profiler.stopPreciseCoverage", callback?: undefined | function): void
  • post(method: "Profiler.stopTypeProfile", callback?: undefined | function): void
  • post(method: "Profiler.takePreciseCoverage", callback?: undefined | function): void
  • post(method: "Profiler.takeTypeProfile", callback?: undefined | function): void
  • post(method: "Runtime.awaitPromise", params?: AwaitPromiseParameterType, callback?: undefined | function): void
  • post(method: "Runtime.awaitPromise", callback?: undefined | function): void
  • post(method: "Runtime.callFunctionOn", params?: CallFunctionOnParameterType, callback?: undefined | function): void
  • post(method: "Runtime.callFunctionOn", callback?: undefined | function): void
  • post(method: "Runtime.compileScript", params?: CompileScriptParameterType, callback?: undefined | function): void
  • post(method: "Runtime.compileScript", callback?: undefined | function): void
  • post(method: "Runtime.disable", callback?: undefined | function): void
  • post(method: "Runtime.discardConsoleEntries", callback?: undefined | function): void
  • post(method: "Runtime.enable", callback?: undefined | function): void
  • post(method: "Runtime.evaluate", params?: EvaluateParameterType, callback?: undefined | function): void
  • post(method: "Runtime.evaluate", callback?: undefined | function): void
  • post(method: "Runtime.getIsolateId", callback?: undefined | function): void
  • post(method: "Runtime.getHeapUsage", callback?: undefined | function): void
  • post(method: "Runtime.getProperties", params?: GetPropertiesParameterType, callback?: undefined | function): void
  • post(method: "Runtime.getProperties", callback?: undefined | function): void
  • post(method: "Runtime.globalLexicalScopeNames", params?: GlobalLexicalScopeNamesParameterType, callback?: undefined | function): void
  • post(method: "Runtime.globalLexicalScopeNames", callback?: undefined | function): void
  • post(method: "Runtime.queryObjects", params?: QueryObjectsParameterType, callback?: undefined | function): void
  • post(method: "Runtime.queryObjects", callback?: undefined | function): void
  • post(method: "Runtime.releaseObject", params?: ReleaseObjectParameterType, callback?: undefined | function): void
  • post(method: "Runtime.releaseObject", callback?: undefined | function): void
  • post(method: "Runtime.releaseObjectGroup", params?: ReleaseObjectGroupParameterType, callback?: undefined | function): void
  • post(method: "Runtime.releaseObjectGroup", callback?: undefined | function): void
  • post(method: "Runtime.runIfWaitingForDebugger", callback?: undefined | function): void
  • post(method: "Runtime.runScript", params?: RunScriptParameterType, callback?: undefined | function): void
  • post(method: "Runtime.runScript", callback?: undefined | function): void
  • post(method: "Runtime.setAsyncCallStackDepth", params?: SetAsyncCallStackDepthParameterType, callback?: undefined | function): void
  • post(method: "Runtime.setAsyncCallStackDepth", callback?: undefined | function): void
  • post(method: "Runtime.setCustomObjectFormatterEnabled", params?: SetCustomObjectFormatterEnabledParameterType, callback?: undefined | function): void
  • post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: undefined | function): void
  • post(method: "Runtime.setMaxCallStackSizeToCapture", params?: SetMaxCallStackSizeToCaptureParameterType, callback?: undefined | function): void
  • post(method: "Runtime.setMaxCallStackSizeToCapture", callback?: undefined | function): void
  • post(method: "Runtime.terminateExecution", callback?: undefined | function): void
  • post(method: "Runtime.addBinding", params?: AddBindingParameterType, callback?: undefined | function): void
  • post(method: "Runtime.addBinding", callback?: undefined | function): void
  • post(method: "Runtime.removeBinding", params?: RemoveBindingParameterType, callback?: undefined | function): void
  • post(method: "Runtime.removeBinding", callback?: undefined | function): void
  • post(method: "Schema.getDomains", callback?: undefined | function): void
  • post(method: "NodeTracing.getCategories", callback?: undefined | function): void
  • post(method: "NodeTracing.start", params?: StartParameterType, callback?: undefined | function): void
  • post(method: "NodeTracing.start", callback?: undefined | function): void
  • post(method: "NodeTracing.stop", callback?: undefined | function): void
  • post(method: "NodeWorker.sendMessageToWorker", params?: SendMessageToWorkerParameterType, callback?: undefined | function): void
  • post(method: "NodeWorker.sendMessageToWorker", callback?: undefined | function): void
  • post(method: "NodeWorker.enable", params?: EnableParameterType, callback?: undefined | function): void
  • post(method: "NodeWorker.enable", callback?: undefined | function): void
  • post(method: "NodeWorker.disable", callback?: undefined | function): void
  • Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result.

    Parameters

    • method: string
    • Optional params: undefined | __type
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: string
    • Optional callback: undefined | function

    Returns void

  • Does nothing.

    Parameters

    • method: "Console.clearMessages"
    • Optional callback: undefined | function

    Returns void

  • Disables console domain, prevents further console messages from being reported to the client.

    Parameters

    • method: "Console.disable"
    • Optional callback: undefined | function

    Returns void

  • Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.

    Parameters

    • method: "Console.enable"
    • Optional callback: undefined | function

    Returns void

  • Continues execution until specific location is reached.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.continueToLocation"
    • Optional callback: undefined | function

    Returns void

  • Disables debugger for given page.

    Parameters

    • method: "Debugger.disable"
    • Optional callback: undefined | function

    Returns void

  • Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

    Parameters

    • method: "Debugger.enable"
    • Optional callback: undefined | function

    Returns void

  • Evaluates expression on a given call frame.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.evaluateOnCallFrame"
    • Optional callback: undefined | function

    Returns void

  • Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.getPossibleBreakpoints"
    • Optional callback: undefined | function

    Returns void

  • Returns source for the script with given id.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.getScriptSource"
    • Optional callback: undefined | function

    Returns void

  • Returns stack trace with given stackTraceId.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.getStackTrace"
    • Optional callback: undefined | function

    Returns void

  • Stops on the next JavaScript statement.

    Parameters

    • method: "Debugger.pause"
    • Optional callback: undefined | function

    Returns void

  • experimental

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.pauseOnAsyncCall"
    • Optional callback: undefined | function

    Returns void

  • Removes JavaScript breakpoint.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.removeBreakpoint"
    • Optional callback: undefined | function

    Returns void

  • Restarts particular call frame from the beginning.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.restartFrame"
    • Optional callback: undefined | function

    Returns void

  • Resumes JavaScript execution.

    Parameters

    • method: "Debugger.resume"
    • Optional callback: undefined | function

    Returns void

  • This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.

    experimental

    Parameters

    • method: "Debugger.scheduleStepIntoAsync"
    • Optional callback: undefined | function

    Returns void

  • Searches for given string in script content.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.searchInContent"
    • Optional callback: undefined | function

    Returns void

  • Enables or disables async call stacks tracking.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setAsyncCallStackDepth"
    • Optional callback: undefined | function

    Returns void

  • 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.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setBlackboxPatterns"
    • Optional callback: undefined | function

    Returns void

  • 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.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setBlackboxedRanges"
    • Optional callback: undefined | function

    Returns void

  • Sets JavaScript breakpoint at a given location.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setBreakpoint"
    • Optional callback: undefined | function

    Returns void

  • 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.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setBreakpointByUrl"
    • Optional callback: undefined | function

    Returns void

  • 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.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setBreakpointOnFunctionCall"
    • Optional callback: undefined | function

    Returns void

  • Activates / deactivates all breakpoints on the page.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setBreakpointsActive"
    • Optional callback: undefined | function

    Returns void

  • 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.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setPauseOnExceptions"
    • Optional callback: undefined | function

    Returns void

  • Changes return value in top frame. Available only at return break position.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setReturnValue"
    • Optional callback: undefined | function

    Returns void

  • Edits JavaScript source live.

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setScriptSource"
    • Optional callback: undefined | function

    Returns void

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

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setSkipAllPauses"
    • Optional callback: undefined | function

    Returns void

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

    Parameters

    Returns void

  • Parameters

    • method: "Debugger.setVariableValue"
    • Optional callback: undefined | function

    Returns void

  • Steps into the function call.

    Parameters

    • method: "Debugger.stepInto"
    • Optional params: StepIntoParameterType
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "Debugger.stepInto"
    • Optional callback: undefined | function

    Returns void

  • Steps out of the function call.

    Parameters

    • method: "Debugger.stepOut"
    • Optional callback: undefined | function

    Returns void

  • Steps over the statement.

    Parameters

    • method: "Debugger.stepOver"
    • Optional callback: undefined | function

    Returns void

  • Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

    Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.addInspectedHeapObject"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "HeapProfiler.collectGarbage"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "HeapProfiler.disable"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "HeapProfiler.enable"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.getHeapObjectId"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.getObjectByHeapObjectId"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "HeapProfiler.getSamplingProfile"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.startSampling"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.startTrackingHeapObjects"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "HeapProfiler.stopSampling"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.stopTrackingHeapObjects"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "HeapProfiler.takeHeapSnapshot"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "Profiler.disable"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "Profiler.enable"
    • Optional callback: undefined | function

    Returns void

  • Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.

    Parameters

    • method: "Profiler.getBestEffortCoverage"
    • Optional callback: undefined | function

    Returns void

  • Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

    Parameters

    Returns void

  • Parameters

    • method: "Profiler.setSamplingInterval"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "Profiler.start"
    • Optional callback: undefined | function

    Returns void

  • Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

    Parameters

    Returns void

  • Parameters

    • method: "Profiler.startPreciseCoverage"
    • Optional callback: undefined | function

    Returns void

  • Enable type profile.

    experimental

    Parameters

    • method: "Profiler.startTypeProfile"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "Profiler.stop"
    • Optional callback: undefined | function

    Returns void

  • Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

    Parameters

    • method: "Profiler.stopPreciseCoverage"
    • Optional callback: undefined | function

    Returns void

  • Disable type profile. Disabling releases type profile data collected so far.

    experimental

    Parameters

    • method: "Profiler.stopTypeProfile"
    • Optional callback: undefined | function

    Returns void

  • Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.

    Parameters

    • method: "Profiler.takePreciseCoverage"
    • Optional callback: undefined | function

    Returns void

  • Collect type profile.

    experimental

    Parameters

    • method: "Profiler.takeTypeProfile"
    • Optional callback: undefined | function

    Returns void

  • Add handler to promise with given promise object id.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.awaitPromise"
    • Optional callback: undefined | function

    Returns void

  • Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.callFunctionOn"
    • Optional callback: undefined | function

    Returns void

  • Compiles expression.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.compileScript"
    • Optional callback: undefined | function

    Returns void

  • Disables reporting of execution contexts creation.

    Parameters

    • method: "Runtime.disable"
    • Optional callback: undefined | function

    Returns void

  • Discards collected exceptions and console API calls.

    Parameters

    • method: "Runtime.discardConsoleEntries"
    • Optional callback: undefined | function

    Returns void

  • Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.

    Parameters

    • method: "Runtime.enable"
    • Optional callback: undefined | function

    Returns void

  • Evaluates expression on global object.

    Parameters

    • method: "Runtime.evaluate"
    • Optional params: EvaluateParameterType
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "Runtime.evaluate"
    • Optional callback: undefined | function

    Returns void

  • Returns the isolate id.

    experimental

    Parameters

    • method: "Runtime.getIsolateId"
    • Optional callback: undefined | function

    Returns void

  • Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.

    experimental

    Parameters

    • method: "Runtime.getHeapUsage"
    • Optional callback: undefined | function

    Returns void

  • Returns properties of a given object. Object group of the result is inherited from the target object.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.getProperties"
    • Optional callback: undefined | function

    Returns void

  • Returns all let, const and class variables from global scope.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.globalLexicalScopeNames"
    • Optional callback: undefined | function

    Returns void

  • Parameters

    Returns void

  • Parameters

    • method: "Runtime.queryObjects"
    • Optional callback: undefined | function

    Returns void

  • Releases remote object with given id.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.releaseObject"
    • Optional callback: undefined | function

    Returns void

  • Releases all remote objects that belong to a given group.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.releaseObjectGroup"
    • Optional callback: undefined | function

    Returns void

  • Tells inspected instance to run if it was waiting for debugger to attach.

    Parameters

    • method: "Runtime.runIfWaitingForDebugger"
    • Optional callback: undefined | function

    Returns void

  • Runs script with given id in a given context.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.runScript"
    • Optional callback: undefined | function

    Returns void

  • Enables or disables async call stacks tracking.

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.setAsyncCallStackDepth"
    • Optional callback: undefined | function

    Returns void

  • experimental

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.setCustomObjectFormatterEnabled"
    • Optional callback: undefined | function

    Returns void

  • experimental

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.setMaxCallStackSizeToCapture"
    • Optional callback: undefined | function

    Returns void

  • Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.

    experimental

    Parameters

    • method: "Runtime.terminateExecution"
    • Optional callback: undefined | function

    Returns void

  • If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. If executionContextId is specified, adds binding only on global object of given execution context. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.addBinding"
    • Optional callback: undefined | function

    Returns void

  • This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.

    experimental

    Parameters

    Returns void

  • Parameters

    • method: "Runtime.removeBinding"
    • Optional callback: undefined | function

    Returns void

  • Returns supported domains.

    Parameters

    • method: "Schema.getDomains"
    • Optional callback: undefined | function

    Returns void

  • Gets supported tracing categories.

    Parameters

    • method: "NodeTracing.getCategories"
    • Optional callback: undefined | function

    Returns void

  • Start trace events collection.

    Parameters

    • method: "NodeTracing.start"
    • Optional params: StartParameterType
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "NodeTracing.start"
    • Optional callback: undefined | function

    Returns void

  • Stop trace events collection. Remaining collected events will be sent as a sequence of dataCollected events followed by tracingComplete event.

    Parameters

    • method: "NodeTracing.stop"
    • Optional callback: undefined | function

    Returns void

  • Sends protocol message over session with given id.

    Parameters

    Returns void

  • Parameters

    • method: "NodeWorker.sendMessageToWorker"
    • Optional callback: undefined | function

    Returns void

  • Instructs the inspector to attach to running workers. Will also attach to new workers as they start

    Parameters

    • method: "NodeWorker.enable"
    • Optional params: EnableParameterType
    • Optional callback: undefined | function

    Returns void

  • Parameters

    • method: "NodeWorker.enable"
    • Optional callback: undefined | function

    Returns void

  • Detaches from all running workers and disables attaching to new workers as they are started.

    Parameters

    • method: "NodeWorker.disable"
    • Optional callback: undefined | function

    Returns void

prependListener

  • prependListener(event: string, listener: function): this
  • prependListener(event: "inspectorNotification", listener: function): this
  • prependListener(event: "Console.messageAdded", listener: function): this
  • prependListener(event: "Debugger.breakpointResolved", listener: function): this
  • prependListener(event: "Debugger.paused", listener: function): this
  • prependListener(event: "Debugger.resumed", listener: function): this
  • prependListener(event: "Debugger.scriptFailedToParse", listener: function): this
  • prependListener(event: "Debugger.scriptParsed", listener: function): this
  • prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: function): this
  • prependListener(event: "HeapProfiler.heapStatsUpdate", listener: function): this
  • prependListener(event: "HeapProfiler.lastSeenObjectId", listener: function): this
  • prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: function): this
  • prependListener(event: "HeapProfiler.resetProfiles", listener: function): this
  • prependListener(event: "Profiler.consoleProfileFinished", listener: function): this
  • prependListener(event: "Profiler.consoleProfileStarted", listener: function): this
  • prependListener(event: "Runtime.bindingCalled", listener: function): this
  • prependListener(event: "Runtime.consoleAPICalled", listener: function): this
  • prependListener(event: "Runtime.exceptionRevoked", listener: function): this
  • prependListener(event: "Runtime.exceptionThrown", listener: function): this
  • prependListener(event: "Runtime.executionContextCreated", listener: function): this
  • prependListener(event: "Runtime.executionContextDestroyed", listener: function): this
  • prependListener(event: "Runtime.executionContextsCleared", listener: function): this
  • prependListener(event: "Runtime.inspectRequested", listener: function): this
  • prependListener(event: "NodeTracing.dataCollected", listener: function): this
  • prependListener(event: "NodeTracing.tracingComplete", listener: function): this
  • prependListener(event: "NodeWorker.attachedToWorker", listener: function): this
  • prependListener(event: "NodeWorker.detachedFromWorker", listener: function): this
  • prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: function): this

prependOnceListener

  • prependOnceListener(event: string, listener: function): this
  • prependOnceListener(event: "inspectorNotification", listener: function): this
  • prependOnceListener(event: "Console.messageAdded", listener: function): this
  • prependOnceListener(event: "Debugger.breakpointResolved", listener: function): this
  • prependOnceListener(event: "Debugger.paused", listener: function): this
  • prependOnceListener(event: "Debugger.resumed", listener: function): this
  • prependOnceListener(event: "Debugger.scriptFailedToParse", listener: function): this
  • prependOnceListener(event: "Debugger.scriptParsed", listener: function): this
  • prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: function): this
  • prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: function): this
  • prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: function): this
  • prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: function): this
  • prependOnceListener(event: "HeapProfiler.resetProfiles", listener: function): this
  • prependOnceListener(event: "Profiler.consoleProfileFinished", listener: function): this
  • prependOnceListener(event: "Profiler.consoleProfileStarted", listener: function): this
  • prependOnceListener(event: "Runtime.bindingCalled", listener: function): this
  • prependOnceListener(event: "Runtime.consoleAPICalled", listener: function): this
  • prependOnceListener(event: "Runtime.exceptionRevoked", listener: function): this
  • prependOnceListener(event: "Runtime.exceptionThrown", listener: function): this
  • prependOnceListener(event: "Runtime.executionContextCreated", listener: function): this
  • prependOnceListener(event: "Runtime.executionContextDestroyed", listener: function): this
  • prependOnceListener(event: "Runtime.executionContextsCleared", listener: function): this
  • prependOnceListener(event: "Runtime.inspectRequested", listener: function): this
  • prependOnceListener(event: "NodeTracing.dataCollected", listener: function): this
  • prependOnceListener(event: "NodeTracing.tracingComplete", listener: function): this
  • prependOnceListener(event: "NodeWorker.attachedToWorker", listener: function): this
  • prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: function): this
  • prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: function): this

rawListeners

  • rawListeners(event: string | symbol): Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    Returns number

Generated using TypeDoc