The inspector.Session
is used for dispatching messages to the V8 inspector
back-end and receiving message responses and notifications.
Constructors Jump to heading
Jump to headingSession()
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.
Methods Jump to heading
Jump to headingaddListener(event: string,listener: (...args: any[]) => void,): this
Jump to headingaddListener(event: "inspectorNotification",listener: (message: InspectorNotification<object>) => void,): this
Emitted when any notification from the V8 Inspector is received.
Jump to headingaddListener(event: "Runtime.executionContextCreated",listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,): this
Issued when new execution context is created.
Jump to headingaddListener(event: "Runtime.executionContextDestroyed",listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,): this
Issued when execution context is destroyed.
Jump to headingaddListener(event: "Runtime.executionContextsCleared",listener: () => void,): this
Issued when all executionContexts were cleared in browser
Jump to headingaddListener(event: "Runtime.exceptionThrown",listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,): this
Issued when exception was thrown and unhandled.
Jump to headingaddListener(event: "Runtime.exceptionRevoked",listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,): this
Issued when unhandled exception was revoked.
Jump to headingaddListener(event: "Runtime.consoleAPICalled",listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,): this
Issued when console API was called.
Jump to headingaddListener(event: "Runtime.inspectRequested",listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void,): this
Issued when object should be inspected (for example, as a result of inspect() command line API call).
Jump to headingaddListener(event: "Debugger.scriptParsed",listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void,): this
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Jump to headingaddListener(event: "Debugger.scriptFailedToParse",listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,): this
Fired when virtual machine fails to parse the script.
Jump to headingaddListener(event: "Debugger.breakpointResolved",listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,): this
Fired when breakpoint is resolved to an actual script and location.
Jump to headingaddListener(event: "Debugger.paused",listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void,): this
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Jump to headingaddListener(event: "Debugger.resumed",listener: () => void,): this
Fired when the virtual machine resumed execution.
Jump to headingaddListener(event: "Console.messageAdded",listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,): this
Issued when new console message is added.
Jump to headingaddListener(event: "Profiler.consoleProfileStarted",listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,): this
Sent when new profile recording is started using console.profile() call.
Jump to headingaddListener(event: "Profiler.consoleProfileFinished",listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,): this
Jump to headingaddListener(event: "HeapProfiler.addHeapSnapshotChunk",listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,): this
Jump to headingaddListener(event: "HeapProfiler.resetProfiles",listener: () => void,): this
Jump to headingaddListener(event: "HeapProfiler.reportHeapSnapshotProgress",listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,): this
Jump to headingaddListener(event: "HeapProfiler.lastSeenObjectId",listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void,): this
If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
Jump to headingaddListener(event: "HeapProfiler.heapStatsUpdate",listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void,): this
If heap objects tracking has been started then backend may send update for one or more fragments
Jump to headingaddListener(event: "NodeTracing.dataCollected",listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,): this
Contains an bucket of collected trace events.
Jump to headingaddListener(event: "NodeTracing.tracingComplete",listener: () => void,): this
Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
Jump to headingaddListener(event: "NodeWorker.attachedToWorker",listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,): this
Issued when attached to a worker.
Jump to headingaddListener(event: "NodeWorker.detachedFromWorker",listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,): this
Issued when detached from the worker.
Jump to headingaddListener(event: "NodeWorker.receivedMessageFromWorker",listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void,): this
Notifies about a new protocol message received from the session (session ID is provided in attachedToWorker notification).
Jump to headingaddListener(event: "Network.requestWillBeSent",listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,): this
Fired when page is about to send HTTP request.
Jump to headingaddListener(event: "Network.responseReceived",listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,): this
Fired when HTTP response is available.
Jump to headingaddListener(event: "Network.loadingFailed",listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,): this
Jump to headingaddListener(event: "Network.loadingFinished",listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,): this
Jump to headingaddListener(event: "NodeRuntime.waitingForDisconnect",listener: () => void,): this
This event is fired instead of Runtime.executionContextDestroyed
when
enabled.
It is fired when the Node process finished all code execution and is
waiting for all frontends to disconnect.
Jump to headingaddListener(event: "NodeRuntime.waitingForDebugger",listener: () => void,): this
This event is fired when the runtime is waiting for the debugger. For example, when inspector.waitingForDebugger is called
Jump to headingconnect(): void
Connects a session to the inspector back-end.
Connects a session to the inspector back-end. An exception will be thrown if this API was not called on a Worker thread.
Jump to headingdisconnect(): 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.
Jump to headingemit(event: string | symbol,...args: any[],): boolean
Jump to headingemit(event: "inspectorNotification",message: InspectorNotification<object>,): boolean
Jump to headingemit(event: "Runtime.executionContextCreated",): boolean
Jump to headingemit(event: "Runtime.executionContextDestroyed",): boolean
Jump to headingemit(event: "Runtime.executionContextsCleared"): boolean
Jump to headingemit(event: "Runtime.exceptionThrown",): boolean
Jump to headingemit(event: "Runtime.exceptionRevoked",): boolean
Jump to headingemit(event: "Runtime.consoleAPICalled",): boolean
Jump to headingemit(event: "Runtime.inspectRequested",): boolean
Jump to headingemit(event: "Debugger.scriptParsed",): boolean
Jump to headingemit(event: "Debugger.scriptFailedToParse",): boolean
Jump to headingemit(event: "Debugger.breakpointResolved",): boolean
Jump to headingemit(event: "Debugger.paused",): boolean
Jump to headingemit(event: "Debugger.resumed"): boolean
Jump to headingemit(event: "Console.messageAdded",): boolean
Jump to headingemit(event: "Profiler.consoleProfileStarted",): boolean
Jump to headingemit(event: "Profiler.consoleProfileFinished",): boolean
Jump to headingemit(event: "HeapProfiler.addHeapSnapshotChunk",): boolean
Jump to headingemit(event: "HeapProfiler.resetProfiles"): boolean
Jump to headingemit(event: "HeapProfiler.reportHeapSnapshotProgress",): boolean
Jump to headingemit(event: "HeapProfiler.lastSeenObjectId",): boolean
Jump to headingemit(event: "HeapProfiler.heapStatsUpdate",): boolean
Jump to headingemit(event: "NodeTracing.dataCollected",): boolean
Jump to headingemit(event: "NodeTracing.tracingComplete"): boolean
Jump to headingemit(event: "NodeWorker.attachedToWorker",): boolean
Jump to headingemit(event: "NodeWorker.detachedFromWorker",): boolean
Jump to headingemit(event: "NodeWorker.receivedMessageFromWorker",): boolean
Jump to headingemit(event: "Network.requestWillBeSent",): boolean
Jump to headingemit(event: "Network.responseReceived",): boolean
Jump to headingemit(event: "Network.loadingFailed",): boolean
Jump to headingemit(event: "Network.loadingFinished",): boolean
Jump to headingemit(event: "NodeRuntime.waitingForDisconnect"): boolean
Jump to headingemit(event: "NodeRuntime.waitingForDebugger"): boolean
Jump to headingon(event: string,listener: (...args: any[]) => void,): this
Jump to headingon(event: "inspectorNotification",listener: (message: InspectorNotification<object>) => void,): this
Emitted when any notification from the V8 Inspector is received.
Jump to headingon(event: "Runtime.executionContextCreated",listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,): this
Issued when new execution context is created.
Jump to headingon(event: "Runtime.executionContextDestroyed",listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,): this
Issued when execution context is destroyed.
Jump to headingon(event: "Runtime.executionContextsCleared",listener: () => void,): this
Issued when all executionContexts were cleared in browser
Jump to headingon(event: "Runtime.exceptionThrown",listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,): this
Issued when exception was thrown and unhandled.
Jump to headingon(event: "Runtime.exceptionRevoked",listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,): this
Issued when unhandled exception was revoked.
Jump to headingon(event: "Runtime.consoleAPICalled",listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,): this
Issued when console API was called.
Jump to headingon(event: "Runtime.inspectRequested",listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void,): this
Issued when object should be inspected (for example, as a result of inspect() command line API call).
Jump to headingon(event: "Debugger.scriptParsed",listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void,): this
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Jump to headingon(event: "Debugger.scriptFailedToParse",listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,): this
Fired when virtual machine fails to parse the script.
Jump to headingon(event: "Debugger.breakpointResolved",listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,): this
Fired when breakpoint is resolved to an actual script and location.
Jump to headingon(event: "Debugger.paused",listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void,): this
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Jump to headingon(event: "Debugger.resumed",listener: () => void,): this
Fired when the virtual machine resumed execution.
Jump to headingon(event: "Console.messageAdded",listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,): this
Issued when new console message is added.
Jump to headingon(event: "Profiler.consoleProfileStarted",listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,): this
Sent when new profile recording is started using console.profile() call.
Jump to headingon(event: "Profiler.consoleProfileFinished",listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,): this
Jump to headingon(event: "HeapProfiler.addHeapSnapshotChunk",listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,): this
Jump to headingon(event: "HeapProfiler.resetProfiles",listener: () => void,): this
Jump to headingon(event: "HeapProfiler.reportHeapSnapshotProgress",listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,): this
Jump to headingon(event: "HeapProfiler.lastSeenObjectId",listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void,): this
If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
Jump to headingon(event: "HeapProfiler.heapStatsUpdate",listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void,): this
If heap objects tracking has been started then backend may send update for one or more fragments
Jump to headingon(event: "NodeTracing.dataCollected",listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,): this
Contains an bucket of collected trace events.
Jump to headingon(event: "NodeTracing.tracingComplete",listener: () => void,): this
Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
Jump to headingon(event: "NodeWorker.attachedToWorker",listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,): this
Issued when attached to a worker.
Jump to headingon(event: "NodeWorker.detachedFromWorker",listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,): this
Issued when detached from the worker.
Jump to headingon(event: "NodeWorker.receivedMessageFromWorker",listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void,): this
Notifies about a new protocol message received from the session (session ID is provided in attachedToWorker notification).
Jump to headingon(event: "Network.requestWillBeSent",listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,): this
Fired when page is about to send HTTP request.
Jump to headingon(event: "Network.responseReceived",listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,): this
Fired when HTTP response is available.
Jump to headingon(event: "Network.loadingFailed",listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,): this
Jump to headingon(event: "Network.loadingFinished",listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,): this
Jump to headingon(event: "NodeRuntime.waitingForDisconnect",listener: () => void,): this
This event is fired instead of Runtime.executionContextDestroyed
when
enabled.
It is fired when the Node process finished all code execution and is
waiting for all frontends to disconnect.
Jump to headingon(event: "NodeRuntime.waitingForDebugger",listener: () => void,): this
This event is fired when the runtime is waiting for the debugger. For example, when inspector.waitingForDebugger is called
Jump to headingonce(event: string,listener: (...args: any[]) => void,): this
Jump to headingonce(event: "inspectorNotification",listener: (message: InspectorNotification<object>) => void,): this
Emitted when any notification from the V8 Inspector is received.
Jump to headingonce(event: "Runtime.executionContextCreated",listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,): this
Issued when new execution context is created.
Jump to headingonce(event: "Runtime.executionContextDestroyed",listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,): this
Issued when execution context is destroyed.
Jump to headingonce(event: "Runtime.executionContextsCleared",listener: () => void,): this
Issued when all executionContexts were cleared in browser
Jump to headingonce(event: "Runtime.exceptionThrown",listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,): this
Issued when exception was thrown and unhandled.
Jump to headingonce(event: "Runtime.exceptionRevoked",listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,): this
Issued when unhandled exception was revoked.
Jump to headingonce(event: "Runtime.consoleAPICalled",listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,): this
Issued when console API was called.
Jump to headingonce(event: "Runtime.inspectRequested",listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void,): this
Issued when object should be inspected (for example, as a result of inspect() command line API call).
Jump to headingonce(event: "Debugger.scriptParsed",listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void,): this
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Jump to headingonce(event: "Debugger.scriptFailedToParse",listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,): this
Fired when virtual machine fails to parse the script.
Jump to headingonce(event: "Debugger.breakpointResolved",listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,): this
Fired when breakpoint is resolved to an actual script and location.
Jump to headingonce(event: "Debugger.paused",listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void,): this
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Jump to headingonce(event: "Debugger.resumed",listener: () => void,): this
Fired when the virtual machine resumed execution.
Jump to headingonce(event: "Console.messageAdded",listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,): this
Issued when new console message is added.
Jump to headingonce(event: "Profiler.consoleProfileStarted",listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,): this
Sent when new profile recording is started using console.profile() call.
Jump to headingonce(event: "Profiler.consoleProfileFinished",listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,): this
Jump to headingonce(event: "HeapProfiler.addHeapSnapshotChunk",listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,): this
Jump to headingonce(event: "HeapProfiler.resetProfiles",listener: () => void,): this
Jump to headingonce(event: "HeapProfiler.reportHeapSnapshotProgress",listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,): this
Jump to headingonce(event: "HeapProfiler.lastSeenObjectId",listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void,): this
If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
Jump to headingonce(event: "HeapProfiler.heapStatsUpdate",listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void,): this
If heap objects tracking has been started then backend may send update for one or more fragments
Jump to headingonce(event: "NodeTracing.dataCollected",listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,): this
Contains an bucket of collected trace events.
Jump to headingonce(event: "NodeTracing.tracingComplete",listener: () => void,): this
Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
Jump to headingonce(event: "NodeWorker.attachedToWorker",listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,): this
Issued when attached to a worker.
Jump to headingonce(event: "NodeWorker.detachedFromWorker",listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,): this
Issued when detached from the worker.
Jump to headingonce(event: "NodeWorker.receivedMessageFromWorker",listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void,): this
Notifies about a new protocol message received from the session (session ID is provided in attachedToWorker notification).
Jump to headingonce(event: "Network.requestWillBeSent",listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,): this
Fired when page is about to send HTTP request.
Jump to headingonce(event: "Network.responseReceived",listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,): this
Fired when HTTP response is available.
Jump to headingonce(event: "Network.loadingFailed",listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,): this
Jump to headingonce(event: "Network.loadingFinished",listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,): this
Jump to headingonce(event: "NodeRuntime.waitingForDisconnect",listener: () => void,): this
This event is fired instead of Runtime.executionContextDestroyed
when
enabled.
It is fired when the Node process finished all code execution and is
waiting for all frontends to disconnect.
Jump to headingonce(event: "NodeRuntime.waitingForDebugger",listener: () => void,): this
This event is fired when the runtime is waiting for the debugger. For example, when inspector.waitingForDebugger is called
Jump to headingpost(method: string,params?: object,): Promise<void>
Posts a message to the inspector back-end.
import { Session } from 'node:inspector/promises';
try {
const session = new Session();
session.connect();
const result = await session.post('Runtime.evaluate', { expression: '2 + 2' });
console.log(result);
} catch (error) {
console.error(error);
}
// Output: { result: { type: 'number', value: 4, description: '4' } }
The latest version of the V8 inspector protocol is published on the Chrome DevTools Protocol Viewer.
Node.js inspector supports all the Chrome DevTools Protocol domains declared by V8. Chrome DevTools Protocol domain provides an interface for interacting with one of the runtime agents used to inspect the application state and listen to the run-time events.
Jump to headingpost(method: "Schema.getDomains"): Promise<Schema.GetDomainsReturnType>
Returns supported domains.
Jump to headingpost(method: "Runtime.evaluate",params?: Runtime.EvaluateParameterType,): Promise<Runtime.EvaluateReturnType>
Evaluates expression on global object.
Jump to headingpost(method: "Runtime.awaitPromise",params?: Runtime.AwaitPromiseParameterType,): Promise<Runtime.AwaitPromiseReturnType>
Add handler to promise with given promise object id.
Jump to headingpost(method: "Runtime.callFunctionOn",params?: Runtime.CallFunctionOnParameterType,): Promise<Runtime.CallFunctionOnReturnType>
Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
Jump to headingpost(method: "Runtime.getProperties",params?: Runtime.GetPropertiesParameterType,): Promise<Runtime.GetPropertiesReturnType>
Returns properties of a given object. Object group of the result is inherited from the target object.
Jump to headingpost(method: "Runtime.releaseObject",params?: Runtime.ReleaseObjectParameterType,): Promise<void>
Releases remote object with given id.
Jump to headingpost(method: "Runtime.releaseObjectGroup",params?: Runtime.ReleaseObjectGroupParameterType,): Promise<void>
Releases all remote objects that belong to a given group.
Jump to headingpost(method: "Runtime.runIfWaitingForDebugger"): Promise<void>
Tells inspected instance to run if it was waiting for debugger to attach.
Jump to headingpost(method: "Runtime.enable"): Promise<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.
Jump to headingpost(method: "Runtime.disable"): Promise<void>
Disables reporting of execution contexts creation.
Jump to headingpost(method: "Runtime.discardConsoleEntries"): Promise<void>
Discards collected exceptions and console API calls.
Jump to headingpost(method: "Runtime.setCustomObjectFormatterEnabled",): Promise<void>
Jump to headingpost(method: "Runtime.compileScript",params?: Runtime.CompileScriptParameterType,): Promise<Runtime.CompileScriptReturnType>
Compiles expression.
Jump to headingpost(method: "Runtime.runScript",params?: Runtime.RunScriptParameterType,): Promise<Runtime.RunScriptReturnType>
Runs script with given id in a given context.
Jump to headingpost(method: "Runtime.queryObjects",params?: Runtime.QueryObjectsParameterType,): Promise<Runtime.QueryObjectsReturnType>
Jump to headingpost(method: "Runtime.globalLexicalScopeNames",): Promise<Runtime.GlobalLexicalScopeNamesReturnType>
Returns all let, const and class variables from global scope.
Jump to headingpost(method: "Debugger.enable"): Promise<Debugger.EnableReturnType>
Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
Jump to headingpost(method: "Debugger.disable"): Promise<void>
Disables debugger for given page.
Jump to headingpost(method: "Debugger.setBreakpointsActive",): Promise<void>
Activates / deactivates all breakpoints on the page.
Jump to headingpost(method: "Debugger.setSkipAllPauses",params?: Debugger.SetSkipAllPausesParameterType,): Promise<void>
Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
Jump to headingpost(method: "Debugger.setBreakpointByUrl",params?: Debugger.SetBreakpointByUrlParameterType,): Promise<Debugger.SetBreakpointByUrlReturnType>
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.
Jump to headingpost(method: "Debugger.setBreakpoint",params?: Debugger.SetBreakpointParameterType,): Promise<Debugger.SetBreakpointReturnType>
Sets JavaScript breakpoint at a given location.
Jump to headingpost(method: "Debugger.removeBreakpoint",params?: Debugger.RemoveBreakpointParameterType,): Promise<void>
Removes JavaScript breakpoint.
Jump to headingpost(method: "Debugger.getPossibleBreakpoints",): Promise<Debugger.GetPossibleBreakpointsReturnType>
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
Jump to headingpost(method: "Debugger.continueToLocation",params?: Debugger.ContinueToLocationParameterType,): Promise<void>
Continues execution until specific location is reached.
Jump to headingpost(method: "Debugger.pauseOnAsyncCall",params?: Debugger.PauseOnAsyncCallParameterType,): Promise<void>
Jump to headingpost(method: "Debugger.stepOver"): Promise<void>
Steps over the statement.
Jump to headingpost(method: "Debugger.stepInto",params?: Debugger.StepIntoParameterType,): Promise<void>
Steps into the function call.
Jump to headingpost(method: "Debugger.stepOut"): Promise<void>
Steps out of the function call.
Jump to headingpost(method: "Debugger.pause"): Promise<void>
Stops on the next JavaScript statement.
Jump to headingpost(method: "Debugger.scheduleStepIntoAsync"): Promise<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.
Jump to headingpost(method: "Debugger.resume"): Promise<void>
Resumes JavaScript execution.
Jump to headingpost(method: "Debugger.getStackTrace",params?: Debugger.GetStackTraceParameterType,): Promise<Debugger.GetStackTraceReturnType>
Returns stack trace with given stackTraceId
.
Jump to headingpost(method: "Debugger.searchInContent",params?: Debugger.SearchInContentParameterType,): Promise<Debugger.SearchInContentReturnType>
Searches for given string in script content.
Jump to headingpost(method: "Debugger.setScriptSource",params?: Debugger.SetScriptSourceParameterType,): Promise<Debugger.SetScriptSourceReturnType>
Edits JavaScript source live.
Jump to headingpost(method: "Debugger.restartFrame",params?: Debugger.RestartFrameParameterType,): Promise<Debugger.RestartFrameReturnType>
Restarts particular call frame from the beginning.
Jump to headingpost(method: "Debugger.getScriptSource",params?: Debugger.GetScriptSourceParameterType,): Promise<Debugger.GetScriptSourceReturnType>
Returns source for the script with given id.
Jump to headingpost(method: "Debugger.setPauseOnExceptions",): Promise<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
.
Jump to headingpost(method: "Debugger.evaluateOnCallFrame",): Promise<Debugger.EvaluateOnCallFrameReturnType>
Evaluates expression on a given call frame.
Jump to headingpost(method: "Debugger.setVariableValue",params?: Debugger.SetVariableValueParameterType,): Promise<void>
Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
Jump to headingpost(method: "Debugger.setReturnValue",params?: Debugger.SetReturnValueParameterType,): Promise<void>
Changes return value in top frame. Available only at return break position.
Jump to headingpost(method: "Debugger.setAsyncCallStackDepth",): Promise<void>
Enables or disables async call stacks tracking.
Jump to headingpost(method: "Debugger.setBlackboxPatterns",): Promise<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.
Jump to headingpost(method: "Debugger.setBlackboxedRanges",): Promise<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.
Jump to headingpost(method: "Console.enable"): Promise<void>
Enables console domain, sends the messages collected so far to the client by means of the messageAdded
notification.
Jump to headingpost(method: "Console.disable"): Promise<void>
Disables console domain, prevents further console messages from being reported to the client.
Jump to headingpost(method: "Console.clearMessages"): Promise<void>
Does nothing.
Jump to headingpost(method: "Profiler.enable"): Promise<void>
Jump to headingpost(method: "Profiler.disable"): Promise<void>
Jump to headingpost(method: "Profiler.setSamplingInterval",): Promise<void>
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
Jump to headingpost(method: "Profiler.start"): Promise<void>
Jump to headingpost(method: "Profiler.stop"): Promise<Profiler.StopReturnType>
Jump to headingpost(method: "Profiler.startPreciseCoverage",): Promise<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.
Jump to headingpost(method: "Profiler.stopPreciseCoverage"): Promise<void>
Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
Jump to headingpost(method: "Profiler.takePreciseCoverage"): Promise<Profiler.TakePreciseCoverageReturnType>
Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
Jump to headingpost(method: "Profiler.getBestEffortCoverage"): Promise<Profiler.GetBestEffortCoverageReturnType>
Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
Jump to headingpost(method: "HeapProfiler.enable"): Promise<void>
Jump to headingpost(method: "HeapProfiler.disable"): Promise<void>
Jump to headingpost(method: "HeapProfiler.startTrackingHeapObjects",): Promise<void>
Jump to headingpost(method: "HeapProfiler.stopTrackingHeapObjects",): Promise<void>
Jump to headingpost(method: "HeapProfiler.takeHeapSnapshot",): Promise<void>
Jump to headingpost(method: "HeapProfiler.collectGarbage"): Promise<void>
Jump to headingpost(method: "HeapProfiler.getObjectByHeapObjectId",): Promise<HeapProfiler.GetObjectByHeapObjectIdReturnType>
Jump to headingpost(method: "HeapProfiler.addInspectedHeapObject",): Promise<void>
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
Jump to headingpost(method: "HeapProfiler.getHeapObjectId",): Promise<HeapProfiler.GetHeapObjectIdReturnType>
Jump to headingpost(method: "HeapProfiler.startSampling",params?: HeapProfiler.StartSamplingParameterType,): Promise<void>
Jump to headingpost(method: "HeapProfiler.stopSampling"): Promise<HeapProfiler.StopSamplingReturnType>
Jump to headingpost(method: "HeapProfiler.getSamplingProfile"): Promise<HeapProfiler.GetSamplingProfileReturnType>
Jump to headingpost(method: "NodeTracing.getCategories"): Promise<NodeTracing.GetCategoriesReturnType>
Gets supported tracing categories.
Jump to headingpost(method: "NodeTracing.start",params?: NodeTracing.StartParameterType,): Promise<void>
Start trace events collection.
Jump to headingpost(method: "NodeTracing.stop"): Promise<void>
Stop trace events collection. Remaining collected events will be sent as a sequence of dataCollected events followed by tracingComplete event.
Jump to headingpost(method: "NodeWorker.sendMessageToWorker",): Promise<void>
Sends protocol message over session with given id.
Jump to headingpost(method: "NodeWorker.enable",params?: NodeWorker.EnableParameterType,): Promise<void>
Instructs the inspector to attach to running workers. Will also attach to new workers as they start
Jump to headingpost(method: "NodeWorker.disable"): Promise<void>
Detaches from all running workers and disables attaching to new workers as they are started.
Jump to headingpost(method: "NodeWorker.detach",params?: NodeWorker.DetachParameterType,): Promise<void>
Detached from the worker with given sessionId.
Jump to headingpost(method: "Network.disable"): Promise<void>
Disables network tracking, prevents network events from being sent to the client.
Jump to headingpost(method: "Network.enable"): Promise<void>
Enables network tracking, network events will now be delivered to the client.
Jump to headingpost(method: "NodeRuntime.enable"): Promise<void>
Enable the NodeRuntime events except by NodeRuntime.waitingForDisconnect
.
Jump to headingpost(method: "NodeRuntime.disable"): Promise<void>
Disable NodeRuntime events
Jump to headingpost(method: "NodeRuntime.notifyWhenWaitingForDisconnect",): Promise<void>
Enable the NodeRuntime.waitingForDisconnect
.
Jump to headingprependListener(event: string,listener: (...args: any[]) => void,): this
Jump to headingprependListener(event: "inspectorNotification",listener: (message: InspectorNotification<object>) => void,): this
Emitted when any notification from the V8 Inspector is received.
Jump to headingprependListener(event: "Runtime.executionContextCreated",listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,): this
Issued when new execution context is created.
Jump to headingprependListener(event: "Runtime.executionContextDestroyed",listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,): this
Issued when execution context is destroyed.
Jump to headingprependListener(event: "Runtime.executionContextsCleared",listener: () => void,): this
Issued when all executionContexts were cleared in browser
Jump to headingprependListener(event: "Runtime.exceptionThrown",listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,): this
Issued when exception was thrown and unhandled.
Jump to headingprependListener(event: "Runtime.exceptionRevoked",listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,): this
Issued when unhandled exception was revoked.
Jump to headingprependListener(event: "Runtime.consoleAPICalled",listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,): this
Issued when console API was called.
Jump to headingprependListener(event: "Runtime.inspectRequested",listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void,): this
Issued when object should be inspected (for example, as a result of inspect() command line API call).
Jump to headingprependListener(event: "Debugger.scriptParsed",listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void,): this
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Jump to headingprependListener(event: "Debugger.scriptFailedToParse",listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,): this
Fired when virtual machine fails to parse the script.
Jump to headingprependListener(event: "Debugger.breakpointResolved",listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,): this
Fired when breakpoint is resolved to an actual script and location.
Jump to headingprependListener(event: "Debugger.paused",listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void,): this
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Jump to headingprependListener(event: "Debugger.resumed",listener: () => void,): this
Fired when the virtual machine resumed execution.
Jump to headingprependListener(event: "Console.messageAdded",listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,): this
Issued when new console message is added.
Jump to headingprependListener(event: "Profiler.consoleProfileStarted",listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,): this
Sent when new profile recording is started using console.profile() call.
Jump to headingprependListener(event: "Profiler.consoleProfileFinished",listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,): this
Jump to headingprependListener(event: "HeapProfiler.addHeapSnapshotChunk",listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,): this
Jump to headingprependListener(event: "HeapProfiler.resetProfiles",listener: () => void,): this
Jump to headingprependListener(event: "HeapProfiler.reportHeapSnapshotProgress",listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,): this
Jump to headingprependListener(event: "HeapProfiler.lastSeenObjectId",listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void,): this
If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
Jump to headingprependListener(event: "HeapProfiler.heapStatsUpdate",listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void,): this
If heap objects tracking has been started then backend may send update for one or more fragments
Jump to headingprependListener(event: "NodeTracing.dataCollected",listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,): this
Contains an bucket of collected trace events.
Jump to headingprependListener(event: "NodeTracing.tracingComplete",listener: () => void,): this
Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
Jump to headingprependListener(event: "NodeWorker.attachedToWorker",listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,): this
Issued when attached to a worker.
Jump to headingprependListener(event: "NodeWorker.detachedFromWorker",listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,): this
Issued when detached from the worker.
Jump to headingprependListener(event: "NodeWorker.receivedMessageFromWorker",listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void,): this
Notifies about a new protocol message received from the session (session ID is provided in attachedToWorker notification).
Jump to headingprependListener(event: "Network.requestWillBeSent",listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,): this
Fired when page is about to send HTTP request.
Jump to headingprependListener(event: "Network.responseReceived",listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,): this
Fired when HTTP response is available.
Jump to headingprependListener(event: "Network.loadingFailed",listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,): this
Jump to headingprependListener(event: "Network.loadingFinished",listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,): this
Jump to headingprependListener(event: "NodeRuntime.waitingForDisconnect",listener: () => void,): this
This event is fired instead of Runtime.executionContextDestroyed
when
enabled.
It is fired when the Node process finished all code execution and is
waiting for all frontends to disconnect.
Jump to headingprependListener(event: "NodeRuntime.waitingForDebugger",listener: () => void,): this
This event is fired when the runtime is waiting for the debugger. For example, when inspector.waitingForDebugger is called
Jump to headingprependOnceListener(event: string,listener: (...args: any[]) => void,): this
Jump to headingprependOnceListener(event: "inspectorNotification",listener: (message: InspectorNotification<object>) => void,): this
Emitted when any notification from the V8 Inspector is received.
Jump to headingprependOnceListener(event: "Runtime.executionContextCreated",listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,): this
Issued when new execution context is created.
Jump to headingprependOnceListener(event: "Runtime.executionContextDestroyed",listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,): this
Issued when execution context is destroyed.
Jump to headingprependOnceListener(event: "Runtime.executionContextsCleared",listener: () => void,): this
Issued when all executionContexts were cleared in browser
Jump to headingprependOnceListener(event: "Runtime.exceptionThrown",listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,): this
Issued when exception was thrown and unhandled.
Jump to headingprependOnceListener(event: "Runtime.exceptionRevoked",listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,): this
Issued when unhandled exception was revoked.
Jump to headingprependOnceListener(event: "Runtime.consoleAPICalled",listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,): this
Issued when console API was called.
Jump to headingprependOnceListener(event: "Runtime.inspectRequested",listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void,): this
Issued when object should be inspected (for example, as a result of inspect() command line API call).
Jump to headingprependOnceListener(event: "Debugger.scriptParsed",listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void,): this
Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Jump to headingprependOnceListener(event: "Debugger.scriptFailedToParse",listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,): this
Fired when virtual machine fails to parse the script.
Jump to headingprependOnceListener(event: "Debugger.breakpointResolved",listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,): this
Fired when breakpoint is resolved to an actual script and location.
Jump to headingprependOnceListener(event: "Debugger.paused",listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void,): this
Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Jump to headingprependOnceListener(event: "Debugger.resumed",listener: () => void,): this
Fired when the virtual machine resumed execution.
Jump to headingprependOnceListener(event: "Console.messageAdded",listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,): this
Issued when new console message is added.
Jump to headingprependOnceListener(event: "Profiler.consoleProfileStarted",listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,): this
Sent when new profile recording is started using console.profile() call.
Jump to headingprependOnceListener(event: "Profiler.consoleProfileFinished",listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,): this
Jump to headingprependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk",listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,): this
Jump to headingprependOnceListener(event: "HeapProfiler.resetProfiles",listener: () => void,): this
Jump to headingprependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress",listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,): this
Jump to headingprependOnceListener(event: "HeapProfiler.lastSeenObjectId",listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void,): this
If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
Jump to headingprependOnceListener(event: "HeapProfiler.heapStatsUpdate",listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void,): this
If heap objects tracking has been started then backend may send update for one or more fragments
Jump to headingprependOnceListener(event: "NodeTracing.dataCollected",listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,): this
Contains an bucket of collected trace events.
Jump to headingprependOnceListener(event: "NodeTracing.tracingComplete",listener: () => void,): this
Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
Jump to headingprependOnceListener(event: "NodeWorker.attachedToWorker",listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,): this
Issued when attached to a worker.
Jump to headingprependOnceListener(event: "NodeWorker.detachedFromWorker",listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,): this
Issued when detached from the worker.
Jump to headingprependOnceListener(event: "NodeWorker.receivedMessageFromWorker",listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void,): this
Notifies about a new protocol message received from the session (session ID is provided in attachedToWorker notification).
Jump to headingprependOnceListener(event: "Network.requestWillBeSent",listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,): this
Fired when page is about to send HTTP request.
Jump to headingprependOnceListener(event: "Network.responseReceived",listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,): this
Fired when HTTP response is available.
Jump to headingprependOnceListener(event: "Network.loadingFailed",listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,): this
Jump to headingprependOnceListener(event: "Network.loadingFinished",listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,): this
Jump to headingprependOnceListener(event: "NodeRuntime.waitingForDisconnect",listener: () => void,): this
This event is fired instead of Runtime.executionContextDestroyed
when
enabled.
It is fired when the Node process finished all code execution and is
waiting for all frontends to disconnect.
Jump to headingprependOnceListener(event: "NodeRuntime.waitingForDebugger",listener: () => void,): this
This event is fired when the runtime is waiting for the debugger. For example, when inspector.waitingForDebugger is called