Spec-Zone.ru › Deno 2

inspector/promises

The node:inspector/promises module provides an API for interacting with the V8 inspector.

Usage in Deno

import * as mod from "node:inspector/promises";

class Session

extends EventEmitter

Usage in Deno

import { Session } from "node:inspector/promises";

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

Constructors

Session()
new

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

addListener(
event: string,
listener: (...args: any[]) => void,
): this
addListener(
event: "inspectorNotification",
listener: (message: InspectorNotification<object>) => void,
): this

Emitted when any notification from the V8 Inspector is received.

addListener(
event: "Runtime.executionContextCreated",
listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,
): this

Issued when new execution context is created.

addListener(
event: "Runtime.executionContextDestroyed",
listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,
): this

Issued when execution context is destroyed.

addListener(
event: "Runtime.executionContextsCleared",
listener: () => void,
): this

Issued when all executionContexts were cleared in browser

addListener(
event: "Runtime.exceptionThrown",
listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,
): this

Issued when exception was thrown and unhandled.

addListener(
event: "Runtime.exceptionRevoked",
listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,
): this

Issued when unhandled exception was revoked.

addListener(
event: "Runtime.consoleAPICalled",
listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,
): this

Issued when console API was called.

addListener(
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).

addListener(
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.

addListener(
event: "Debugger.scriptFailedToParse",
listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,
): this

Fired when virtual machine fails to parse the script.

addListener(
event: "Debugger.breakpointResolved",
listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,
): this

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

addListener(
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.

addListener(
event: "Debugger.resumed",
listener: () => void,
): this

Fired when the virtual machine resumed execution.

addListener(
event: "Console.messageAdded",
listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,
): this

Issued when new console message is added.

addListener(
event: "Profiler.consoleProfileStarted",
listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,
): this

Sent when new profile recording is started using console.profile() call.

addListener(
event: "Profiler.consoleProfileFinished",
listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,
): this
addListener(
event: "HeapProfiler.addHeapSnapshotChunk",
listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,
): this
addListener(
event: "HeapProfiler.resetProfiles",
listener: () => void,
): this
addListener(
event: "HeapProfiler.reportHeapSnapshotProgress",
listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,
): this
addListener(
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.

addListener(
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

addListener(
event: "NodeTracing.dataCollected",
listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,
): this

Contains an bucket of collected trace events.

addListener(
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.

addListener(
event: "NodeWorker.attachedToWorker",
listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,
): this

Issued when attached to a worker.

addListener(
event: "NodeWorker.detachedFromWorker",
listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,
): this

Issued when detached from the worker.

addListener(
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).

addListener(
event: "Network.requestWillBeSent",
listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,
): this

Fired when page is about to send HTTP request.

addListener(
event: "Network.responseReceived",
listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,
): this

Fired when HTTP response is available.

addListener(
event: "Network.loadingFailed",
listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,
): this
addListener(
event: "Network.loadingFinished",
listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,
): this
addListener(
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.

addListener(
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

connect(): void

Connects a session to the inspector back-end.

connectToMainThread(): void

Connects a session to the inspector back-end. An exception will be thrown if this API was not called on a Worker thread.

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.

emit(
event: string | symbol,
...args: any[],
): boolean
emit(
event: "inspectorNotification",
message: InspectorNotification<object>,
): boolean
emit(
event: "Runtime.executionContextCreated",
message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>,
): boolean
emit(
event: "Runtime.executionContextDestroyed",
message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>,
): boolean
emit(event: "Runtime.executionContextsCleared"): boolean
emit(
event: "Runtime.exceptionThrown",
message: InspectorNotification<Runtime.ExceptionThrownEventDataType>,
): boolean
emit(
event: "Runtime.exceptionRevoked",
message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>,
): boolean
emit(
event: "Runtime.consoleAPICalled",
message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>,
): boolean
emit(
event: "Runtime.inspectRequested",
message: InspectorNotification<Runtime.InspectRequestedEventDataType>,
): boolean
emit(
event: "Debugger.scriptParsed",
message: InspectorNotification<Debugger.ScriptParsedEventDataType>,
): boolean
emit(
event: "Debugger.scriptFailedToParse",
message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>,
): boolean
emit(
event: "Debugger.breakpointResolved",
message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>,
): boolean
emit(
event: "Debugger.paused",
message: InspectorNotification<Debugger.PausedEventDataType>,
): boolean
emit(event: "Debugger.resumed"): boolean
emit(
event: "Console.messageAdded",
message: InspectorNotification<Console.MessageAddedEventDataType>,
): boolean
emit(
event: "Profiler.consoleProfileStarted",
message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>,
): boolean
emit(
event: "Profiler.consoleProfileFinished",
message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>,
): boolean
emit(
event: "HeapProfiler.addHeapSnapshotChunk",
message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>,
): boolean
emit(event: "HeapProfiler.resetProfiles"): boolean
emit(
event: "HeapProfiler.reportHeapSnapshotProgress",
message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>,
): boolean
emit(
event: "HeapProfiler.lastSeenObjectId",
message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>,
): boolean
emit(
event: "HeapProfiler.heapStatsUpdate",
message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>,
): boolean
emit(
event: "NodeTracing.dataCollected",
message: InspectorNotification<NodeTracing.DataCollectedEventDataType>,
): boolean
emit(event: "NodeTracing.tracingComplete"): boolean
emit(
event: "NodeWorker.attachedToWorker",
message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>,
): boolean
emit(
event: "NodeWorker.detachedFromWorker",
message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>,
): boolean
emit(
event: "NodeWorker.receivedMessageFromWorker",
message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>,
): boolean
emit(
event: "Network.requestWillBeSent",
message: InspectorNotification<Network.RequestWillBeSentEventDataType>,
): boolean
emit(
event: "Network.responseReceived",
message: InspectorNotification<Network.ResponseReceivedEventDataType>,
): boolean
emit(
event: "Network.loadingFailed",
message: InspectorNotification<Network.LoadingFailedEventDataType>,
): boolean
emit(
event: "Network.loadingFinished",
message: InspectorNotification<Network.LoadingFinishedEventDataType>,
): boolean
emit(event: "NodeRuntime.waitingForDisconnect"): boolean
emit(event: "NodeRuntime.waitingForDebugger"): boolean
on(
event: string,
listener: (...args: any[]) => void,
): this
on(
event: "inspectorNotification",
listener: (message: InspectorNotification<object>) => void,
): this

Emitted when any notification from the V8 Inspector is received.

on(
event: "Runtime.executionContextCreated",
listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,
): this

Issued when new execution context is created.

on(
event: "Runtime.executionContextDestroyed",
listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,
): this

Issued when execution context is destroyed.

on(
event: "Runtime.executionContextsCleared",
listener: () => void,
): this

Issued when all executionContexts were cleared in browser

on(
event: "Runtime.exceptionThrown",
listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,
): this

Issued when exception was thrown and unhandled.

on(
event: "Runtime.exceptionRevoked",
listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,
): this

Issued when unhandled exception was revoked.

on(
event: "Runtime.consoleAPICalled",
listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,
): this

Issued when console API was called.

on(
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).

on(
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.

on(
event: "Debugger.scriptFailedToParse",
listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,
): this

Fired when virtual machine fails to parse the script.

on(
event: "Debugger.breakpointResolved",
listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,
): this

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

on(
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.

on(
event: "Debugger.resumed",
listener: () => void,
): this

Fired when the virtual machine resumed execution.

on(
event: "Console.messageAdded",
listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,
): this

Issued when new console message is added.

on(
event: "Profiler.consoleProfileStarted",
listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,
): this

Sent when new profile recording is started using console.profile() call.

on(
event: "Profiler.consoleProfileFinished",
listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,
): this
on(
event: "HeapProfiler.addHeapSnapshotChunk",
listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,
): this
on(
event: "HeapProfiler.resetProfiles",
listener: () => void,
): this
on(
event: "HeapProfiler.reportHeapSnapshotProgress",
listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,
): this
on(
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.

on(
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

on(
event: "NodeTracing.dataCollected",
listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,
): this

Contains an bucket of collected trace events.

on(
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.

on(
event: "NodeWorker.attachedToWorker",
listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,
): this

Issued when attached to a worker.

on(
event: "NodeWorker.detachedFromWorker",
listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,
): this

Issued when detached from the worker.

on(
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).

on(
event: "Network.requestWillBeSent",
listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,
): this

Fired when page is about to send HTTP request.

on(
event: "Network.responseReceived",
listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,
): this

Fired when HTTP response is available.

on(
event: "Network.loadingFailed",
listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,
): this
on(
event: "Network.loadingFinished",
listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,
): this
on(
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.

on(
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

once(
event: string,
listener: (...args: any[]) => void,
): this
once(
event: "inspectorNotification",
listener: (message: InspectorNotification<object>) => void,
): this

Emitted when any notification from the V8 Inspector is received.

once(
event: "Runtime.executionContextCreated",
listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,
): this

Issued when new execution context is created.

once(
event: "Runtime.executionContextDestroyed",
listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,
): this

Issued when execution context is destroyed.

once(
event: "Runtime.executionContextsCleared",
listener: () => void,
): this

Issued when all executionContexts were cleared in browser

once(
event: "Runtime.exceptionThrown",
listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,
): this

Issued when exception was thrown and unhandled.

once(
event: "Runtime.exceptionRevoked",
listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,
): this

Issued when unhandled exception was revoked.

once(
event: "Runtime.consoleAPICalled",
listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,
): this

Issued when console API was called.

once(
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).

once(
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.

once(
event: "Debugger.scriptFailedToParse",
listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,
): this

Fired when virtual machine fails to parse the script.

once(
event: "Debugger.breakpointResolved",
listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,
): this

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

once(
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.

once(
event: "Debugger.resumed",
listener: () => void,
): this

Fired when the virtual machine resumed execution.

once(
event: "Console.messageAdded",
listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,
): this

Issued when new console message is added.

once(
event: "Profiler.consoleProfileStarted",
listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,
): this

Sent when new profile recording is started using console.profile() call.

once(
event: "Profiler.consoleProfileFinished",
listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,
): this
once(
event: "HeapProfiler.addHeapSnapshotChunk",
listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,
): this
once(
event: "HeapProfiler.resetProfiles",
listener: () => void,
): this
once(
event: "HeapProfiler.reportHeapSnapshotProgress",
listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,
): this
once(
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.

once(
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

once(
event: "NodeTracing.dataCollected",
listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,
): this

Contains an bucket of collected trace events.

once(
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.

once(
event: "NodeWorker.attachedToWorker",
listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,
): this

Issued when attached to a worker.

once(
event: "NodeWorker.detachedFromWorker",
listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,
): this

Issued when detached from the worker.

once(
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).

once(
event: "Network.requestWillBeSent",
listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,
): this

Fired when page is about to send HTTP request.

once(
event: "Network.responseReceived",
listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,
): this

Fired when HTTP response is available.

once(
event: "Network.loadingFailed",
listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,
): this
once(
event: "Network.loadingFinished",
listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,
): this
once(
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.

once(
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

post(
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.

post(method: "Schema.getDomains"): Promise<Schema.GetDomainsReturnType>

Returns supported domains.

post(
method: "Runtime.evaluate",
params?: Runtime.EvaluateParameterType,
): Promise<Runtime.EvaluateReturnType>

Evaluates expression on global object.

post(
method: "Runtime.awaitPromise",
params?: Runtime.AwaitPromiseParameterType,
): Promise<Runtime.AwaitPromiseReturnType>

Add handler to promise with given promise object id.

post(
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.

post(
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.

post(
method: "Runtime.releaseObject",
params?: Runtime.ReleaseObjectParameterType,
): Promise<void>

Releases remote object with given id.

post(
method: "Runtime.releaseObjectGroup",
params?: Runtime.ReleaseObjectGroupParameterType,
): Promise<void>

Releases all remote objects that belong to a given group.

post(method: "Runtime.runIfWaitingForDebugger"): Promise<void>

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

post(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.

post(method: "Runtime.disable"): Promise<void>

Disables reporting of execution contexts creation.

post(method: "Runtime.discardConsoleEntries"): Promise<void>

Discards collected exceptions and console API calls.

post(
method: "Runtime.setCustomObjectFormatterEnabled",
params?: Runtime.SetCustomObjectFormatterEnabledParameterType,
): Promise<void>
post(
method: "Runtime.compileScript",
params?: Runtime.CompileScriptParameterType,
): Promise<Runtime.CompileScriptReturnType>

Compiles expression.

post(
method: "Runtime.runScript",
params?: Runtime.RunScriptParameterType,
): Promise<Runtime.RunScriptReturnType>

Runs script with given id in a given context.

post(
method: "Runtime.queryObjects",
params?: Runtime.QueryObjectsParameterType,
): Promise<Runtime.QueryObjectsReturnType>
post(
method: "Runtime.globalLexicalScopeNames",
params?: Runtime.GlobalLexicalScopeNamesParameterType,
): Promise<Runtime.GlobalLexicalScopeNamesReturnType>

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

post(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.

post(method: "Debugger.disable"): Promise<void>

Disables debugger for given page.

post(
method: "Debugger.setBreakpointsActive",
params?: Debugger.SetBreakpointsActiveParameterType,
): Promise<void>

Activates / deactivates all breakpoints on the page.

post(
method: "Debugger.setSkipAllPauses",
params?: Debugger.SetSkipAllPausesParameterType,
): Promise<void>

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

post(
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.

post(
method: "Debugger.setBreakpoint",
params?: Debugger.SetBreakpointParameterType,
): Promise<Debugger.SetBreakpointReturnType>

Sets JavaScript breakpoint at a given location.

post(
method: "Debugger.removeBreakpoint",
params?: Debugger.RemoveBreakpointParameterType,
): Promise<void>

Removes JavaScript breakpoint.

post(
method: "Debugger.getPossibleBreakpoints",
params?: Debugger.GetPossibleBreakpointsParameterType,
): Promise<Debugger.GetPossibleBreakpointsReturnType>

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

post(
method: "Debugger.continueToLocation",
params?: Debugger.ContinueToLocationParameterType,
): Promise<void>

Continues execution until specific location is reached.

post(
method: "Debugger.pauseOnAsyncCall",
params?: Debugger.PauseOnAsyncCallParameterType,
): Promise<void>
post(method: "Debugger.stepOver"): Promise<void>

Steps over the statement.

post(
method: "Debugger.stepInto",
params?: Debugger.StepIntoParameterType,
): Promise<void>

Steps into the function call.

post(method: "Debugger.stepOut"): Promise<void>

Steps out of the function call.

post(method: "Debugger.pause"): Promise<void>

Stops on the next JavaScript statement.

post(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.

post(method: "Debugger.resume"): Promise<void>

Resumes JavaScript execution.

post(
method: "Debugger.getStackTrace",
params?: Debugger.GetStackTraceParameterType,
): Promise<Debugger.GetStackTraceReturnType>

Returns stack trace with given stackTraceId.

post(
method: "Debugger.searchInContent",
params?: Debugger.SearchInContentParameterType,
): Promise<Debugger.SearchInContentReturnType>

Searches for given string in script content.

post(
method: "Debugger.setScriptSource",
params?: Debugger.SetScriptSourceParameterType,
): Promise<Debugger.SetScriptSourceReturnType>

Edits JavaScript source live.

post(
method: "Debugger.restartFrame",
params?: Debugger.RestartFrameParameterType,
): Promise<Debugger.RestartFrameReturnType>

Restarts particular call frame from the beginning.

post(
method: "Debugger.getScriptSource",
params?: Debugger.GetScriptSourceParameterType,
): Promise<Debugger.GetScriptSourceReturnType>

Returns source for the script with given id.

post(
method: "Debugger.setPauseOnExceptions",
params?: Debugger.SetPauseOnExceptionsParameterType,
): 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.

post(
method: "Debugger.evaluateOnCallFrame",
params?: Debugger.EvaluateOnCallFrameParameterType,
): Promise<Debugger.EvaluateOnCallFrameReturnType>

Evaluates expression on a given call frame.

post(
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.

post(
method: "Debugger.setReturnValue",
params?: Debugger.SetReturnValueParameterType,
): Promise<void>

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

post(
method: "Debugger.setAsyncCallStackDepth",
params?: Debugger.SetAsyncCallStackDepthParameterType,
): Promise<void>

Enables or disables async call stacks tracking.

post(
method: "Debugger.setBlackboxPatterns",
params?: Debugger.SetBlackboxPatternsParameterType,
): 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.

post(
method: "Debugger.setBlackboxedRanges",
params?: Debugger.SetBlackboxedRangesParameterType,
): 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.

post(method: "Console.enable"): Promise<void>

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

post(method: "Console.disable"): Promise<void>

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

post(method: "Console.clearMessages"): Promise<void>

Does nothing.

post(method: "Profiler.enable"): Promise<void>
post(method: "Profiler.disable"): Promise<void>
post(
method: "Profiler.setSamplingInterval",
params?: Profiler.SetSamplingIntervalParameterType,
): Promise<void>

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

post(method: "Profiler.start"): Promise<void>
post(method: "Profiler.stop"): Promise<Profiler.StopReturnType>
post(
method: "Profiler.startPreciseCoverage",
params?: Profiler.StartPreciseCoverageParameterType,
): 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.

post(method: "Profiler.stopPreciseCoverage"): Promise<void>

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

post(method: "Profiler.takePreciseCoverage"): Promise<Profiler.TakePreciseCoverageReturnType>

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

post(method: "Profiler.getBestEffortCoverage"): Promise<Profiler.GetBestEffortCoverageReturnType>

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

post(method: "HeapProfiler.enable"): Promise<void>
post(method: "HeapProfiler.disable"): Promise<void>
post(
method: "HeapProfiler.startTrackingHeapObjects",
params?: HeapProfiler.StartTrackingHeapObjectsParameterType,
): Promise<void>
post(
method: "HeapProfiler.stopTrackingHeapObjects",
params?: HeapProfiler.StopTrackingHeapObjectsParameterType,
): Promise<void>
post(
method: "HeapProfiler.takeHeapSnapshot",
params?: HeapProfiler.TakeHeapSnapshotParameterType,
): Promise<void>
post(method: "HeapProfiler.collectGarbage"): Promise<void>
post(
method: "HeapProfiler.getObjectByHeapObjectId",
params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
): Promise<HeapProfiler.GetObjectByHeapObjectIdReturnType>
post(
method: "HeapProfiler.addInspectedHeapObject",
params?: HeapProfiler.AddInspectedHeapObjectParameterType,
): Promise<void>

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

post(
method: "HeapProfiler.getHeapObjectId",
params?: HeapProfiler.GetHeapObjectIdParameterType,
): Promise<HeapProfiler.GetHeapObjectIdReturnType>
post(
method: "HeapProfiler.startSampling",
params?: HeapProfiler.StartSamplingParameterType,
): Promise<void>
post(method: "HeapProfiler.stopSampling"): Promise<HeapProfiler.StopSamplingReturnType>
post(method: "HeapProfiler.getSamplingProfile"): Promise<HeapProfiler.GetSamplingProfileReturnType>
post(method: "NodeTracing.getCategories"): Promise<NodeTracing.GetCategoriesReturnType>

Gets supported tracing categories.

post(
method: "NodeTracing.start",
params?: NodeTracing.StartParameterType,
): Promise<void>

Start trace events collection.

post(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.

post(
method: "NodeWorker.sendMessageToWorker",
params?: NodeWorker.SendMessageToWorkerParameterType,
): Promise<void>

Sends protocol message over session with given id.

post(
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

post(method: "NodeWorker.disable"): Promise<void>

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

post(
method: "NodeWorker.detach",
params?: NodeWorker.DetachParameterType,
): Promise<void>

Detached from the worker with given sessionId.

post(method: "Network.disable"): Promise<void>

Disables network tracking, prevents network events from being sent to the client.

post(method: "Network.enable"): Promise<void>

Enables network tracking, network events will now be delivered to the client.

post(method: "NodeRuntime.enable"): Promise<void>

Enable the NodeRuntime events except by NodeRuntime.waitingForDisconnect.

post(method: "NodeRuntime.disable"): Promise<void>

Disable NodeRuntime events

post(
method: "NodeRuntime.notifyWhenWaitingForDisconnect",
params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType,
): Promise<void>

Enable the NodeRuntime.waitingForDisconnect.

prependListener(
event: string,
listener: (...args: any[]) => void,
): this
prependListener(
event: "inspectorNotification",
listener: (message: InspectorNotification<object>) => void,
): this

Emitted when any notification from the V8 Inspector is received.

prependListener(
event: "Runtime.executionContextCreated",
listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,
): this

Issued when new execution context is created.

prependListener(
event: "Runtime.executionContextDestroyed",
listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,
): this

Issued when execution context is destroyed.

prependListener(
event: "Runtime.executionContextsCleared",
listener: () => void,
): this

Issued when all executionContexts were cleared in browser

prependListener(
event: "Runtime.exceptionThrown",
listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,
): this

Issued when exception was thrown and unhandled.

prependListener(
event: "Runtime.exceptionRevoked",
listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,
): this

Issued when unhandled exception was revoked.

prependListener(
event: "Runtime.consoleAPICalled",
listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,
): this

Issued when console API was called.

prependListener(
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).

prependListener(
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.

prependListener(
event: "Debugger.scriptFailedToParse",
listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,
): this

Fired when virtual machine fails to parse the script.

prependListener(
event: "Debugger.breakpointResolved",
listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,
): this

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

prependListener(
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.

prependListener(
event: "Debugger.resumed",
listener: () => void,
): this

Fired when the virtual machine resumed execution.

prependListener(
event: "Console.messageAdded",
listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,
): this

Issued when new console message is added.

prependListener(
event: "Profiler.consoleProfileStarted",
listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,
): this

Sent when new profile recording is started using console.profile() call.

prependListener(
event: "Profiler.consoleProfileFinished",
listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,
): this
prependListener(
event: "HeapProfiler.addHeapSnapshotChunk",
listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,
): this
prependListener(
event: "HeapProfiler.resetProfiles",
listener: () => void,
): this
prependListener(
event: "HeapProfiler.reportHeapSnapshotProgress",
listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,
): this
prependListener(
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.

prependListener(
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

prependListener(
event: "NodeTracing.dataCollected",
listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,
): this

Contains an bucket of collected trace events.

prependListener(
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.

prependListener(
event: "NodeWorker.attachedToWorker",
listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,
): this

Issued when attached to a worker.

prependListener(
event: "NodeWorker.detachedFromWorker",
listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,
): this

Issued when detached from the worker.

prependListener(
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).

prependListener(
event: "Network.requestWillBeSent",
listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,
): this

Fired when page is about to send HTTP request.

prependListener(
event: "Network.responseReceived",
listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,
): this

Fired when HTTP response is available.

prependListener(
event: "Network.loadingFailed",
listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,
): this
prependListener(
event: "Network.loadingFinished",
listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,
): this
prependListener(
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.

prependListener(
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

prependOnceListener(
event: string,
listener: (...args: any[]) => void,
): this
prependOnceListener(
event: "inspectorNotification",
listener: (message: InspectorNotification<object>) => void,
): this

Emitted when any notification from the V8 Inspector is received.

prependOnceListener(
event: "Runtime.executionContextCreated",
listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,
): this

Issued when new execution context is created.

prependOnceListener(
event: "Runtime.executionContextDestroyed",
listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,
): this

Issued when execution context is destroyed.

prependOnceListener(
event: "Runtime.executionContextsCleared",
listener: () => void,
): this

Issued when all executionContexts were cleared in browser

prependOnceListener(
event: "Runtime.exceptionThrown",
listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,
): this

Issued when exception was thrown and unhandled.

prependOnceListener(
event: "Runtime.exceptionRevoked",
listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,
): this

Issued when unhandled exception was revoked.

prependOnceListener(
event: "Runtime.consoleAPICalled",
listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,
): this

Issued when console API was called.

prependOnceListener(
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).

prependOnceListener(
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.

prependOnceListener(
event: "Debugger.scriptFailedToParse",
listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,
): this

Fired when virtual machine fails to parse the script.

prependOnceListener(
event: "Debugger.breakpointResolved",
listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,
): this

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

prependOnceListener(
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.

prependOnceListener(
event: "Debugger.resumed",
listener: () => void,
): this

Fired when the virtual machine resumed execution.

prependOnceListener(
event: "Console.messageAdded",
listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,
): this

Issued when new console message is added.

prependOnceListener(
event: "Profiler.consoleProfileStarted",
listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,
): this

Sent when new profile recording is started using console.profile() call.

prependOnceListener(
event: "Profiler.consoleProfileFinished",
listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,
): this
prependOnceListener(
event: "HeapProfiler.addHeapSnapshotChunk",
listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,
): this
prependOnceListener(
event: "HeapProfiler.resetProfiles",
listener: () => void,
): this
prependOnceListener(
event: "HeapProfiler.reportHeapSnapshotProgress",
listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,
): this
prependOnceListener(
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.

prependOnceListener(
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

prependOnceListener(
event: "NodeTracing.dataCollected",
listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,
): this

Contains an bucket of collected trace events.

prependOnceListener(
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.

prependOnceListener(
event: "NodeWorker.attachedToWorker",
listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,
): this

Issued when attached to a worker.

prependOnceListener(
event: "NodeWorker.detachedFromWorker",
listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,
): this

Issued when detached from the worker.

prependOnceListener(
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).

prependOnceListener(
event: "Network.requestWillBeSent",
listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,
): this

Fired when page is about to send HTTP request.

prependOnceListener(
event: "Network.responseReceived",
listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,
): this

Fired when HTTP response is available.

prependOnceListener(
event: "Network.loadingFailed",
listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,
): this
prependOnceListener(
event: "Network.loadingFinished",
listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,
): this
prependOnceListener(
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.

prependOnceListener(
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


function close

Usage in Deno

import { close } from "node:inspector/promises";
close(): void

Deactivate the inspector. Blocks until there are no active connections.

Return Type

void

function Network.loadingFailed

unstable

Usage in Deno

import { Network } from "node:inspector/promises";
loadingFailed(params: LoadingFailedEventDataType): void

This feature is only available with the --experimental-network-inspection flag enabled.

Broadcasts the Network.loadingFailed event to connected frontends. This event indicates that HTTP request has failed to load.

Parameters

params: LoadingFailedEventDataType

Return Type

void

function Network.loadingFinished

unstable

Usage in Deno

import { Network } from "node:inspector/promises";
loadingFinished(params: LoadingFinishedEventDataType): void

This feature is only available with the --experimental-network-inspection flag enabled.

Broadcasts the Network.loadingFinished event to connected frontends. This event indicates that HTTP request has finished loading.

Parameters

params: LoadingFinishedEventDataType

Return Type

void

function Network.requestWillBeSent

unstable

Usage in Deno

import { Network } from "node:inspector/promises";
requestWillBeSent(params: RequestWillBeSentEventDataType): void

This feature is only available with the --experimental-network-inspection flag enabled.

Broadcasts the Network.requestWillBeSent event to connected frontends. This event indicates that the application is about to send an HTTP request.

Parameters

params: RequestWillBeSentEventDataType

Return Type

void

function Network.responseReceived

unstable

Usage in Deno

import { Network } from "node:inspector/promises";
responseReceived(params: ResponseReceivedEventDataType): void

This feature is only available with the --experimental-network-inspection flag enabled.

Broadcasts the Network.responseReceived event to connected frontends. This event indicates that HTTP response is available.

Parameters

params: ResponseReceivedEventDataType

Return Type

void

function open

Usage in Deno

import { open } from "node:inspector/promises";
open(
port?: number,
host?: string,
wait?: boolean,
): Disposable

Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programmatically after node has started.

If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client.

See the security warning regarding the host parameter usage.

Parameters

port: number
optional

Port to listen on for inspector connections. Defaults to what was specified on the CLI.

host: string
optional

Host to listen on for inspector connections. Defaults to what was specified on the CLI.

wait: boolean
optional

Block until a client has connected. Defaults to what was specified on the CLI.

Return Type

Disposable

Disposable that calls inspector.close().


function url

Usage in Deno

import { url } from "node:inspector/promises";
url(): string | undefined

Return the URL of the active inspector, or undefined if there is none.

$ node --inspect -p 'inspector.url()'
Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
For help, see: https://nodejs.org/en/docs/inspector
ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34

$ node --inspect=localhost:3000 -p 'inspector.url()'
Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
For help, see: https://nodejs.org/en/docs/inspector
ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a

$ node -p 'inspector.url()'
undefined

Return Type

string | undefined

function waitForDebugger

Usage in Deno

import { waitForDebugger } from "node:inspector/promises";
waitForDebugger(): void

Blocks until a client (existing or connected later) has sent Runtime.runIfWaitingForDebugger command.

An exception will be thrown if there is no active inspector.

Return Type

void

interface Console.ConsoleMessage

Usage in Deno

import { Console } from "node:inspector/promises";

Console message.

Properties

source: string

Message source.

level: string

Message severity.

text: string

Message text.

url: string | undefined
optional

URL of the message origin.

line: number | undefined
optional

Line number in the resource that generated this message (1-based).

column: number | undefined
optional

Column number in the resource that generated this message (1-based).


interface Console.MessageAddedEventDataType

Usage in Deno

import { Console } from "node:inspector/promises";

Properties

message: ConsoleMessage

Console message that has been added.


interface Debugger.BreakLocation

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Script identifier as reported in the Debugger.scriptParsed.

lineNumber: number

Line number in the script (0-based).

columnNumber: number | undefined
optional

Column number in the script (0-based).

type: string | undefined
optional

interface Debugger.BreakpointResolvedEventDataType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

breakpointId: BreakpointId

Breakpoint unique identifier.

location: Location

Actual breakpoint location.


interface Debugger.CallFrame

Usage in Deno

import { Debugger } from "node:inspector/promises";

JavaScript call frame. Array of call frames form the call stack.

Properties

callFrameId: CallFrameId

Call frame identifier. This identifier is only valid while the virtual machine is paused.

functionName: string

Name of the JavaScript function called on this call frame.

functionLocation: Location | undefined
optional

Location in the source code.

location: Location

Location in the source code.

url: string

JavaScript script name or url.

scopeChain: Scope[]

Scope chain for this call frame.

this: Runtime.RemoteObject

this object for this call frame.

returnValue: Runtime.RemoteObject | undefined
optional

The value being returned, if the function is at return point.


interface Debugger.ContinueToLocationParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

location: Location

Location to continue to.

targetCallFrames: string | undefined
optional

interface Debugger.EnableReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

debuggerId: Runtime.UniqueDebuggerId

Unique identifier of the debugger.


interface Debugger.EvaluateOnCallFrameParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

callFrameId: CallFrameId

Call frame identifier to evaluate on.

expression: string

Expression to evaluate.

objectGroup: string | undefined
optional

String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).

includeCommandLineAPI: boolean | undefined
optional

Specifies whether command line API should be available to the evaluated expression, defaults to false.

silent: boolean | undefined
optional

In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.

returnByValue: boolean | undefined
optional

Whether the result is expected to be a JSON object that should be sent by value.

generatePreview: boolean | undefined
optional

Whether preview should be generated for the result.

throwOnSideEffect: boolean | undefined
optional

Whether to throw an exception if side effect cannot be ruled out during evaluation.


interface Debugger.EvaluateOnCallFrameReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

result: Runtime.RemoteObject

Object wrapper for the evaluation result.

exceptionDetails: Runtime.ExceptionDetails | undefined
optional

Exception details.


interface Debugger.GetPossibleBreakpointsParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

start: Location

Start of range to search possible breakpoint locations in.

end: Location | undefined
optional

End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.

restrictToFunction: boolean | undefined
optional

Only consider locations which are in the same (non-nested) function as start.


interface Debugger.GetPossibleBreakpointsReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

locations: BreakLocation[]

List of the possible breakpoint locations.


interface Debugger.GetScriptSourceParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Id of the script to get source for.


interface Debugger.GetScriptSourceReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptSource: string

Script source.


interface Debugger.GetStackTraceParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

stackTraceId: Runtime.StackTraceId

interface Debugger.GetStackTraceReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

stackTrace: Runtime.StackTrace

interface Debugger.Location

Usage in Deno

import { Debugger } from "node:inspector/promises";

Location in the source code.

Properties

scriptId: Runtime.ScriptId

Script identifier as reported in the Debugger.scriptParsed.

lineNumber: number

Line number in the script (0-based).

columnNumber: number | undefined
optional

Column number in the script (0-based).


interface Debugger.PausedEventDataType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

callFrames: CallFrame[]

Call stack the virtual machine stopped on.

reason: string

Pause reason.

data: { } | undefined
optional

Object containing break-specific auxiliary properties.

hitBreakpoints: string[] | undefined
optional

Hit breakpoints IDs

asyncStackTrace: Runtime.StackTrace | undefined
optional

Async stack trace, if any.

asyncStackTraceId: Runtime.StackTraceId | undefined
optional

Async stack trace, if any.

asyncCallStackTraceId: Runtime.StackTraceId | undefined
optional

Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag.


interface Debugger.PauseOnAsyncCallParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

parentStackTraceId: Runtime.StackTraceId

Debugger will pause when async call with given stack trace is started.


interface Debugger.RemoveBreakpointParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

breakpointId: BreakpointId

interface Debugger.RestartFrameParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

callFrameId: CallFrameId

Call frame identifier to evaluate on.


interface Debugger.RestartFrameReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

callFrames: CallFrame[]

New stack trace.

asyncStackTrace: Runtime.StackTrace | undefined
optional

Async stack trace, if any.

asyncStackTraceId: Runtime.StackTraceId | undefined
optional

Async stack trace, if any.


interface Debugger.Scope

Usage in Deno

import { Debugger } from "node:inspector/promises";

Scope description.

Properties

type: string

Scope type.

object: Runtime.RemoteObject

Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.

name: string | undefined
optional
startLocation: Location | undefined
optional

Location in the source code where scope starts

endLocation: Location | undefined
optional

Location in the source code where scope ends


interface Debugger.ScriptFailedToParseEventDataType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Identifier of the script parsed.

url: string

URL or name of the script parsed (if any).

startLine: number

Line offset of the script within the resource with given URL (for script tags).

startColumn: number

Column offset of the script within the resource with given URL.

endLine: number

Last line of the script.

endColumn: number

Length of the last line of the script.

executionContextId: Runtime.ExecutionContextId

Specifies script creation context.

hash: string

Content hash of the script.

executionContextAuxData: { } | undefined
optional

Embedder-specific auxiliary data.

sourceMapURL: string | undefined
optional

URL of source map associated with script (if any).

hasSourceURL: boolean | undefined
optional

True, if this script has sourceURL.

isModule: boolean | undefined
optional

True, if this script is ES6 module.

length: number | undefined
optional

This script length.

stackTrace: Runtime.StackTrace | undefined
optional

JavaScript top stack frame of where the script parsed event was triggered if available.


interface Debugger.ScriptParsedEventDataType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Identifier of the script parsed.

url: string

URL or name of the script parsed (if any).

startLine: number

Line offset of the script within the resource with given URL (for script tags).

startColumn: number

Column offset of the script within the resource with given URL.

endLine: number

Last line of the script.

endColumn: number

Length of the last line of the script.

executionContextId: Runtime.ExecutionContextId

Specifies script creation context.

hash: string

Content hash of the script.

executionContextAuxData: { } | undefined
optional

Embedder-specific auxiliary data.

isLiveEdit: boolean | undefined
optional

True, if this script is generated as a result of the live edit operation.

sourceMapURL: string | undefined
optional

URL of source map associated with script (if any).

hasSourceURL: boolean | undefined
optional

True, if this script has sourceURL.

isModule: boolean | undefined
optional

True, if this script is ES6 module.

length: number | undefined
optional

This script length.

stackTrace: Runtime.StackTrace | undefined
optional

JavaScript top stack frame of where the script parsed event was triggered if available.


interface Debugger.ScriptPosition

unstable

Usage in Deno

import { Debugger } from "node:inspector/promises";

Location in the source code.

Properties

lineNumber: number
columnNumber: number

interface Debugger.SearchInContentParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Id of the script to search in.

query: string

String to search for.

caseSensitive: boolean | undefined
optional

If true, search is case sensitive.

isRegex: boolean | undefined
optional

If true, treats string parameter as regex.


interface Debugger.SearchInContentReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

result: SearchMatch[]

List of search matches.


interface Debugger.SearchMatch

Usage in Deno

import { Debugger } from "node:inspector/promises";

Search match for resource.

Properties

lineNumber: number

Line number in resource content.

lineContent: string

Line with match content.


interface Debugger.SetAsyncCallStackDepthParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

maxDepth: number

Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).


interface Debugger.SetBlackboxedRangesParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Id of the script.

positions: ScriptPosition[]

interface Debugger.SetBlackboxPatternsParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

patterns: string[]

Array of regexps that will be used to check script url for blackbox state.


interface Debugger.SetBreakpointByUrlParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

lineNumber: number

Line number to set breakpoint at.

url: string | undefined
optional

URL of the resources to set breakpoint on.

urlRegex: string | undefined
optional

Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.

scriptHash: string | undefined
optional

Script hash of the resources to set breakpoint on.

columnNumber: number | undefined
optional

Offset in the line to set breakpoint at.

condition: string | undefined
optional

Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.


interface Debugger.SetBreakpointByUrlReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

breakpointId: BreakpointId

Id of the created breakpoint for further reference.

locations: Location[]

List of the locations this breakpoint resolved into upon addition.


interface Debugger.SetBreakpointParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

location: Location

Location to set breakpoint in.

condition: string | undefined
optional

Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.


interface Debugger.SetBreakpointReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

breakpointId: BreakpointId

Id of the created breakpoint for further reference.

actualLocation: Location

Location this breakpoint resolved into.


interface Debugger.SetBreakpointsActiveParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

active: boolean

New value for breakpoints active state.


interface Debugger.SetPauseOnExceptionsParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

state: string

Pause on exceptions mode.


interface Debugger.SetReturnValueParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

newValue: Runtime.CallArgument

New return value.


interface Debugger.SetScriptSourceParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scriptId: Runtime.ScriptId

Id of the script to edit.

scriptSource: string

New content of the script.

dryRun: boolean | undefined
optional

If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.


interface Debugger.SetScriptSourceReturnType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

callFrames: CallFrame[] | undefined
optional

New stack trace in case editing has happened while VM was stopped.

stackChanged: boolean | undefined
optional

Whether current call stack was modified after applying the changes.

asyncStackTrace: Runtime.StackTrace | undefined
optional

Async stack trace, if any.

asyncStackTraceId: Runtime.StackTraceId | undefined
optional

Async stack trace, if any.

exceptionDetails: Runtime.ExceptionDetails | undefined
optional

Exception details if any.


interface Debugger.SetSkipAllPausesParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

skip: boolean

New value for skip pauses state.


interface Debugger.SetVariableValueParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

scopeNumber: number

0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.

variableName: string

Variable name.

newValue: Runtime.CallArgument

New variable value.

callFrameId: CallFrameId

Id of callframe that holds variable.


interface Debugger.StepIntoParameterType

Usage in Deno

import { Debugger } from "node:inspector/promises";

Properties

breakOnAsyncCall: boolean | undefined
optional

Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.


interface HeapProfiler.AddHeapSnapshotChunkEventDataType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

chunk: string

interface HeapProfiler.AddInspectedHeapObjectParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

heapObjectId: HeapSnapshotObjectId

Heap snapshot object id to be accessible by means of $x command line API.


interface HeapProfiler.GetHeapObjectIdParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

objectId: Runtime.RemoteObjectId

Identifier of the object to get heap object id for.


interface HeapProfiler.GetHeapObjectIdReturnType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

heapSnapshotObjectId: HeapSnapshotObjectId

Id of the heap snapshot object corresponding to the passed remote object id.


interface HeapProfiler.GetObjectByHeapObjectIdParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

objectId: HeapSnapshotObjectId
objectGroup: string | undefined
optional

Symbolic group name that can be used to release multiple objects.


interface HeapProfiler.GetObjectByHeapObjectIdReturnType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

result: Runtime.RemoteObject

Evaluation result.


interface HeapProfiler.GetSamplingProfileReturnType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

profile: SamplingHeapProfile

Return the sampling profile being collected.


interface HeapProfiler.HeapStatsUpdateEventDataType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

statsUpdate: number[]

An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.


interface HeapProfiler.LastSeenObjectIdEventDataType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

lastSeenObjectId: number
timestamp: number

interface HeapProfiler.ReportHeapSnapshotProgressEventDataType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

done: number
total: number
finished: boolean | undefined
optional

interface HeapProfiler.SamplingHeapProfile

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Profile.

Properties

head: SamplingHeapProfileNode

interface HeapProfiler.SamplingHeapProfileNode

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.

Properties

callFrame: Runtime.CallFrame

Function location.

selfSize: number

Allocations size in bytes for the node excluding children.

children: SamplingHeapProfileNode[]

Child nodes.


interface HeapProfiler.StartSamplingParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

samplingInterval: number | undefined
optional

Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.


interface HeapProfiler.StartTrackingHeapObjectsParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

trackAllocations: boolean | undefined
optional

interface HeapProfiler.StopSamplingReturnType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

profile: SamplingHeapProfile

Recorded sampling heap profile.


interface HeapProfiler.StopTrackingHeapObjectsParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

reportProgress: boolean | undefined
optional

If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.


interface HeapProfiler.TakeHeapSnapshotParameterType

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Properties

reportProgress: boolean | undefined
optional

If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.


interface InspectorNotification

Usage in Deno

import { type InspectorNotification } from "node:inspector/promises";

Type Parameters

T

Properties

method: string
params: T

interface Network.Headers

Usage in Deno

import { Network } from "node:inspector/promises";

Request / response headers as keys / values of JSON object.


interface Network.LoadingFailedEventDataType

Usage in Deno

import { Network } from "node:inspector/promises";

Properties

requestId: RequestId

Request identifier.

timestamp: MonotonicTime

Timestamp.

type: ResourceType

Resource type.

errorText: string

Error message.


interface Network.LoadingFinishedEventDataType

Usage in Deno

import { Network } from "node:inspector/promises";

Properties

requestId: RequestId

Request identifier.

timestamp: MonotonicTime

Timestamp.


interface Network.Request

Usage in Deno

import { Network } from "node:inspector/promises";

HTTP request data.

Properties

url: string
method: string
headers: Headers

interface Network.RequestWillBeSentEventDataType

Usage in Deno

import { Network } from "node:inspector/promises";

Properties

requestId: RequestId

Request identifier.

request: Request

Request data.

timestamp: MonotonicTime

Timestamp.

wallTime: TimeSinceEpoch

Timestamp.


interface Network.Response

Usage in Deno

import { Network } from "node:inspector/promises";

HTTP response data.

Properties

url: string
status: number
statusText: string
headers: Headers

interface Network.ResponseReceivedEventDataType

Usage in Deno

import { Network } from "node:inspector/promises";

Properties

requestId: RequestId

Request identifier.

timestamp: MonotonicTime

Timestamp.

type: ResourceType

Resource type.

response: Response

Response data.


interface NodeRuntime.NotifyWhenWaitingForDisconnectParameterType

Usage in Deno

import { NodeRuntime } from "node:inspector/promises";

Properties

enabled: boolean

interface NodeTracing.DataCollectedEventDataType

Usage in Deno

import { NodeTracing } from "node:inspector/promises";

Properties

value: Array<{ }>

interface NodeTracing.GetCategoriesReturnType

Usage in Deno

import { NodeTracing } from "node:inspector/promises";

Properties

categories: string[]

A list of supported tracing categories.


interface NodeTracing.StartParameterType

Usage in Deno

import { NodeTracing } from "node:inspector/promises";

Properties

traceConfig: TraceConfig

interface NodeTracing.TraceConfig

Usage in Deno

import { NodeTracing } from "node:inspector/promises";

Properties

recordMode: string | undefined
optional

Controls how the trace buffer stores data.

includedCategories: string[]

Included category filters.


interface NodeWorker.AttachedToWorkerEventDataType

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

sessionId: SessionID

Identifier assigned to the session used to send/receive messages.

workerInfo: WorkerInfo
waitingForDebugger: boolean

interface NodeWorker.DetachedFromWorkerEventDataType

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

sessionId: SessionID

Detached session identifier.


interface NodeWorker.DetachParameterType

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

sessionId: SessionID

interface NodeWorker.EnableParameterType

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

waitForDebuggerOnStart: boolean

Whether to new workers should be paused until the frontend sends Runtime.runIfWaitingForDebugger message to run them.


interface NodeWorker.ReceivedMessageFromWorkerEventDataType

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

sessionId: SessionID

Identifier of a session which sends a message.

message: string

interface NodeWorker.SendMessageToWorkerParameterType

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

message: string
sessionId: SessionID

Identifier of the session.


interface NodeWorker.WorkerInfo

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Properties

workerId: WorkerID
type: string
title: string
url: string

interface Profiler.ConsoleProfileFinishedEventDataType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

id: string
location: Debugger.Location

Location of console.profileEnd().

profile: Profile
title: string | undefined
optional

Profile title passed as an argument to console.profile().


interface Profiler.ConsoleProfileStartedEventDataType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

id: string
location: Debugger.Location

Location of console.profile().

title: string | undefined
optional

Profile title passed as an argument to console.profile().


interface Profiler.CoverageRange

Usage in Deno

import { Profiler } from "node:inspector/promises";

Coverage data for a source range.

Properties

startOffset: number

JavaScript script source offset for the range start.

endOffset: number

JavaScript script source offset for the range end.

count: number

Collected execution count of the source range.


interface Profiler.FunctionCoverage

Usage in Deno

import { Profiler } from "node:inspector/promises";

Coverage data for a JavaScript function.

Properties

functionName: string

JavaScript function name.

ranges: CoverageRange[]

Source ranges inside the function with coverage data.

isBlockCoverage: boolean

Whether coverage data for this function has block granularity.


interface Profiler.GetBestEffortCoverageReturnType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

result: ScriptCoverage[]

Coverage data for the current isolate.


interface Profiler.PositionTickInfo

Usage in Deno

import { Profiler } from "node:inspector/promises";

Specifies a number of samples attributed to a certain source position.

Properties

line: number

Source line number (1-based).

ticks: number

Number of samples attributed to the source line.


interface Profiler.Profile

Usage in Deno

import { Profiler } from "node:inspector/promises";

Profile.

Properties

nodes: ProfileNode[]

The list of profile nodes. First item is the root node.

startTime: number

Profiling start timestamp in microseconds.

endTime: number

Profiling end timestamp in microseconds.

samples: number[] | undefined
optional

Ids of samples top nodes.

timeDeltas: number[] | undefined
optional

Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.


interface Profiler.ProfileNode

Usage in Deno

import { Profiler } from "node:inspector/promises";

Profile node. Holds callsite information, execution statistics and child nodes.

Properties

id: number

Unique id of the node.

callFrame: Runtime.CallFrame

Function location.

hitCount: number | undefined
optional

Number of samples where this node was on top of the call stack.

children: number[] | undefined
optional

Child node ids.

deoptReason: string | undefined
optional

The reason of being not optimized. The function may be deoptimized or marked as don't optimize.

positionTicks: PositionTickInfo[] | undefined
optional

An array of source position ticks.


interface Profiler.ScriptCoverage

Usage in Deno

import { Profiler } from "node:inspector/promises";

Coverage data for a JavaScript script.

Properties

scriptId: Runtime.ScriptId

JavaScript script id.

url: string

JavaScript script name or url.

functions: FunctionCoverage[]

Functions contained in the script that has coverage data.


interface Profiler.SetSamplingIntervalParameterType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

interval: number

New sampling interval in microseconds.


interface Profiler.StartPreciseCoverageParameterType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

callCount: boolean | undefined
optional

Collect accurate call counts beyond simple 'covered' or 'not covered'.

detailed: boolean | undefined
optional

Collect block-based coverage.


interface Profiler.StopReturnType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

profile: Profile

Recorded profile.


interface Profiler.TakePreciseCoverageReturnType

Usage in Deno

import { Profiler } from "node:inspector/promises";

Properties

result: ScriptCoverage[]

Coverage data for the current isolate.


interface Runtime.AwaitPromiseParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

promiseObjectId: RemoteObjectId

Identifier of the promise.

returnByValue: boolean | undefined
optional

Whether the result is expected to be a JSON object that should be sent by value.

generatePreview: boolean | undefined
optional

Whether preview should be generated for the result.


interface Runtime.AwaitPromiseReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

result: RemoteObject

Promise result. Will contain rejected value if promise was rejected.

exceptionDetails: ExceptionDetails | undefined
optional

Exception details if stack strace is available.


interface Runtime.CallArgument

Usage in Deno

import { Runtime } from "node:inspector/promises";

Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.

Properties

value: any
optional

Primitive value or serializable javascript object.

unserializableValue: UnserializableValue | undefined
optional

Primitive value which can not be JSON-stringified.

objectId: RemoteObjectId | undefined
optional

Remote object handle.


interface Runtime.CallFrame

Usage in Deno

import { Runtime } from "node:inspector/promises";

Stack entry for runtime errors and assertions.

Properties

functionName: string

JavaScript function name.

scriptId: ScriptId

JavaScript script id.

url: string

JavaScript script name or url.

lineNumber: number

JavaScript script line number (0-based).

columnNumber: number

JavaScript script column number (0-based).


interface Runtime.CallFunctionOnParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

functionDeclaration: string

Declaration of the function to call.

objectId: RemoteObjectId | undefined
optional

Identifier of the object to call function on. Either objectId or executionContextId should be specified.

arguments: CallArgument[] | undefined
optional

Call arguments. All call arguments must belong to the same JavaScript world as the target object.

silent: boolean | undefined
optional

In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.

returnByValue: boolean | undefined
optional

Whether the result is expected to be a JSON object which should be sent by value.

generatePreview: boolean | undefined
optional

Whether preview should be generated for the result.

userGesture: boolean | undefined
optional

Whether execution should be treated as initiated by user in the UI.

awaitPromise: boolean | undefined
optional

Whether execution should await for resulting value and return once awaited promise is resolved.

executionContextId: ExecutionContextId | undefined
optional

Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.

objectGroup: string | undefined
optional

Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.


interface Runtime.CallFunctionOnReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

result: RemoteObject

Call result.

exceptionDetails: ExceptionDetails | undefined
optional

Exception details.


interface Runtime.CompileScriptParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

expression: string

Expression to compile.

sourceURL: string

Source url to be set for the script.

persistScript: boolean

Specifies whether the compiled script should be persisted.

executionContextId: ExecutionContextId | undefined
optional

Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.


interface Runtime.CompileScriptReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

scriptId: ScriptId | undefined
optional

Id of the script.

exceptionDetails: ExceptionDetails | undefined
optional

Exception details.


interface Runtime.ConsoleAPICalledEventDataType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

type: string

Type of the call.

args: RemoteObject[]

Call arguments.

executionContextId: ExecutionContextId

Identifier of the context where the call was made.

timestamp: Timestamp

Call timestamp.

stackTrace: StackTrace | undefined
optional

Stack trace captured when the call was made.

context: string | undefined
optional

Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.


interface Runtime.CustomPreview

unstable

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

header: string
hasBody: boolean
formatterObjectId: RemoteObjectId
bindRemoteObjectFunctionId: RemoteObjectId
configObjectId: RemoteObjectId | undefined
optional

interface Runtime.EntryPreview

unstable

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

key: ObjectPreview | undefined
optional

Preview of the key. Specified for map-like collection entries.

value: ObjectPreview

Preview of the value.


interface Runtime.EvaluateParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

expression: string

Expression to evaluate.

objectGroup: string | undefined
optional

Symbolic group name that can be used to release multiple objects.

includeCommandLineAPI: boolean | undefined
optional

Determines whether Command Line API should be available during the evaluation.

silent: boolean | undefined
optional

In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.

contextId: ExecutionContextId | undefined
optional

Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.

returnByValue: boolean | undefined
optional

Whether the result is expected to be a JSON object that should be sent by value.

generatePreview: boolean | undefined
optional

Whether preview should be generated for the result.

userGesture: boolean | undefined
optional

Whether execution should be treated as initiated by user in the UI.

awaitPromise: boolean | undefined
optional

Whether execution should await for resulting value and return once awaited promise is resolved.


interface Runtime.EvaluateReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

result: RemoteObject

Evaluation result.

exceptionDetails: ExceptionDetails | undefined
optional

Exception details.


interface Runtime.ExceptionDetails

Usage in Deno

import { Runtime } from "node:inspector/promises";

Detailed information about exception (or error) that was thrown during script compilation or execution.

Properties

exceptionId: number

Exception id.

text: string

Exception text, which should be used together with exception object when available.

lineNumber: number

Line number of the exception location (0-based).

columnNumber: number

Column number of the exception location (0-based).

scriptId: ScriptId | undefined
optional

Script ID of the exception location.

url: string | undefined
optional

URL of the exception location, to be used when the script was not reported.

stackTrace: StackTrace | undefined
optional

JavaScript stack trace if available.

exception: RemoteObject | undefined
optional

Exception object if available.

executionContextId: ExecutionContextId | undefined
optional

Identifier of the context where exception happened.


interface Runtime.ExceptionRevokedEventDataType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

reason: string

Reason describing why exception was revoked.

exceptionId: number

The id of revoked exception, as reported in exceptionThrown.


interface Runtime.ExceptionThrownEventDataType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

timestamp: Timestamp

Timestamp of the exception.

exceptionDetails: ExceptionDetails

interface Runtime.ExecutionContextCreatedEventDataType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

context: ExecutionContextDescription

A newly created execution context.


interface Runtime.ExecutionContextDescription

Usage in Deno

import { Runtime } from "node:inspector/promises";

Description of an isolated world.

Properties

id: ExecutionContextId

Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.

origin: string

Execution context origin.

name: string

Human readable name describing given context.

auxData: { } | undefined
optional

Embedder-specific auxiliary data.


interface Runtime.ExecutionContextDestroyedEventDataType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

executionContextId: ExecutionContextId

Id of the destroyed context


interface Runtime.GetPropertiesParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

objectId: RemoteObjectId

Identifier of the object to return properties for.

ownProperties: boolean | undefined
optional

If true, returns properties belonging only to the element itself, not to its prototype chain.

accessorPropertiesOnly: boolean | undefined
optional

If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.

generatePreview: boolean | undefined
optional

Whether preview should be generated for the results.


interface Runtime.GetPropertiesReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

result: PropertyDescriptor[]

Object properties.

internalProperties: InternalPropertyDescriptor[] | undefined
optional

Internal object properties (only of the element itself).

exceptionDetails: ExceptionDetails | undefined
optional

Exception details.


interface Runtime.GlobalLexicalScopeNamesParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

executionContextId: ExecutionContextId | undefined
optional

Specifies in which execution context to lookup global scope variables.


interface Runtime.GlobalLexicalScopeNamesReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

names: string[]

interface Runtime.InspectRequestedEventDataType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

object: RemoteObject
hints: { }

interface Runtime.InternalPropertyDescriptor

Usage in Deno

import { Runtime } from "node:inspector/promises";

Object internal property descriptor. This property isn't normally visible in JavaScript code.

Properties

name: string

Conventional property name.

value: RemoteObject | undefined
optional

The value associated with the property.


interface Runtime.ObjectPreview

unstable

Usage in Deno

import { Runtime } from "node:inspector/promises";

Object containing abbreviated remote object value.

Properties

type: string

Object type.

subtype: string | undefined
optional

Object subtype hint. Specified for object type values only.

description: string | undefined
optional

String representation of the object.

overflow: boolean

True iff some of the properties or entries of the original object did not fit.

properties: PropertyPreview[]

List of the properties.

entries: EntryPreview[] | undefined
optional

List of the entries. Specified for map and set subtype values only.


interface Runtime.PropertyDescriptor

Usage in Deno

import { Runtime } from "node:inspector/promises";

Object property descriptor.

Properties

name: string

Property name or symbol description.

value: RemoteObject | undefined
optional

The value associated with the property.

writable: boolean | undefined
optional

True if the value associated with the property may be changed (data descriptors only).

get: RemoteObject | undefined
optional

A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).

set: RemoteObject | undefined
optional

A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only).

configurable: boolean

True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.

enumerable: boolean

True if this property shows up during enumeration of the properties on the corresponding object.

wasThrown: boolean | undefined
optional

True if the result was thrown during the evaluation.

isOwn: boolean | undefined
optional

True if the property is owned for the object.

symbol: RemoteObject | undefined
optional

Property symbol object, if the property is of the symbol type.


interface Runtime.PropertyPreview

unstable

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

name: string

Property name.

type: string

Object type. Accessor means that the property itself is an accessor property.

value: string | undefined
optional

User-friendly property value string.

valuePreview: ObjectPreview | undefined
optional

Nested value preview.

subtype: string | undefined
optional

Object subtype hint. Specified for object type values only.


interface Runtime.QueryObjectsParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

prototypeObjectId: RemoteObjectId

Identifier of the prototype to return objects for.


interface Runtime.QueryObjectsReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

objects: RemoteObject

Array with objects.


interface Runtime.ReleaseObjectGroupParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

objectGroup: string

Symbolic object group name.


interface Runtime.ReleaseObjectParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

objectId: RemoteObjectId

Identifier of the object to release.


interface Runtime.RemoteObject

Usage in Deno

import { Runtime } from "node:inspector/promises";

Mirror object referencing original JavaScript object.

Properties

type: string

Object type.

subtype: string | undefined
optional

Object subtype hint. Specified for object type values only.

className: string | undefined
optional

Object class (constructor) name. Specified for object type values only.

value: any
optional

Remote object value in case of primitive values or JSON values (if it was requested).

unserializableValue: UnserializableValue | undefined
optional

Primitive value which can not be JSON-stringified does not have value, but gets this property.

description: string | undefined
optional

String representation of the object.

objectId: RemoteObjectId | undefined
optional

Unique object identifier (for non-primitive values).

preview: ObjectPreview | undefined
optional

Preview containing abbreviated property values. Specified for object type values only.

customPreview: CustomPreview | undefined
optional

interface Runtime.RunScriptParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

scriptId: ScriptId

Id of the script to run.

executionContextId: ExecutionContextId | undefined
optional

Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.

objectGroup: string | undefined
optional

Symbolic group name that can be used to release multiple objects.

silent: boolean | undefined
optional

In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.

includeCommandLineAPI: boolean | undefined
optional

Determines whether Command Line API should be available during the evaluation.

returnByValue: boolean | undefined
optional

Whether the result is expected to be a JSON object which should be sent by value.

generatePreview: boolean | undefined
optional

Whether preview should be generated for the result.

awaitPromise: boolean | undefined
optional

Whether execution should await for resulting value and return once awaited promise is resolved.


interface Runtime.RunScriptReturnType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

result: RemoteObject

Run result.

exceptionDetails: ExceptionDetails | undefined
optional

Exception details.


interface Runtime.SetCustomObjectFormatterEnabledParameterType

Usage in Deno

import { Runtime } from "node:inspector/promises";

Properties

enabled: boolean

interface Runtime.StackTrace

Usage in Deno

import { Runtime } from "node:inspector/promises";

Call frames for assertions or error messages.

Properties

description: string | undefined
optional

String label of this stack trace. For async traces this may be a name of the function that initiated the async call.

callFrames: CallFrame[]

JavaScript function name.

parent: StackTrace | undefined
optional

Asynchronous JavaScript stack trace that preceded this stack, if available.

parentId: StackTraceId | undefined
optional

Asynchronous JavaScript stack trace that preceded this stack, if available.


interface Runtime.StackTraceId

unstable

Usage in Deno

import { Runtime } from "node:inspector/promises";

If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages.

Properties

id: string
debuggerId: UniqueDebuggerId | undefined
optional

interface Schema.Domain

Usage in Deno

import { Schema } from "node:inspector/promises";

Description of the protocol domain.

Properties

name: string

Domain name.

version: string

Domain version.


interface Schema.GetDomainsReturnType

Usage in Deno

import { Schema } from "node:inspector/promises";

Properties

domains: Domain[]

List of supported domains.


namespace Console

Usage in Deno

import { Console } from "node:inspector/promises";

Interfaces

Console.ConsoleMessage

Console message.

  • column
  • level
  • line
  • source
  • text
  • url
Console.MessageAddedEventDataType
No documentation available
  • message

namespace Debugger

Usage in Deno

import { Debugger } from "node:inspector/promises";

Interfaces

Debugger.BreakLocation
No documentation available
  • columnNumber
  • lineNumber
  • scriptId
  • type
Debugger.BreakpointResolvedEventDataType
No documentation available
  • breakpointId
  • location
Debugger.CallFrame

JavaScript call frame. Array of call frames form the call stack.

  • callFrameId
  • functionLocation
  • functionName
  • location
  • returnValue
  • scopeChain
  • this
  • url
Debugger.ContinueToLocationParameterType
No documentation available
  • location
  • targetCallFrames
Debugger.EnableReturnType
No documentation available
  • debuggerId
Debugger.EvaluateOnCallFrameParameterType
No documentation available
  • callFrameId
  • expression
  • generatePreview
  • includeCommandLineAPI
  • objectGroup
  • returnByValue
  • silent
  • throwOnSideEffect
Debugger.EvaluateOnCallFrameReturnType
No documentation available
  • exceptionDetails
  • result
Debugger.GetPossibleBreakpointsParameterType
No documentation available
  • end
  • restrictToFunction
  • start
Debugger.GetPossibleBreakpointsReturnType
No documentation available
  • locations
Debugger.GetScriptSourceParameterType
No documentation available
  • scriptId
Debugger.GetScriptSourceReturnType
No documentation available
  • scriptSource
Debugger.GetStackTraceParameterType
No documentation available
  • stackTraceId
Debugger.GetStackTraceReturnType
No documentation available
  • stackTrace
Debugger.Location

Location in the source code.

  • columnNumber
  • lineNumber
  • scriptId
Debugger.PausedEventDataType
No documentation available
  • asyncCallStackTraceId
  • asyncStackTrace
  • asyncStackTraceId
  • callFrames
  • data
  • hitBreakpoints
  • reason
Debugger.PauseOnAsyncCallParameterType
No documentation available
  • parentStackTraceId
Debugger.RemoveBreakpointParameterType
No documentation available
  • breakpointId
Debugger.RestartFrameParameterType
No documentation available
  • callFrameId
Debugger.RestartFrameReturnType
No documentation available
  • asyncStackTrace
  • asyncStackTraceId
  • callFrames
Debugger.Scope

Scope description.

  • endLocation
  • name
  • object
  • startLocation
  • type
Debugger.ScriptFailedToParseEventDataType
No documentation available
  • endColumn
  • endLine
  • executionContextAuxData
  • executionContextId
  • hasSourceURL
  • hash
  • isModule
  • length
  • scriptId
  • sourceMapURL
  • stackTrace
  • startColumn
  • startLine
  • url
Debugger.ScriptParsedEventDataType
No documentation available
  • endColumn
  • endLine
  • executionContextAuxData
  • executionContextId
  • hasSourceURL
  • hash
  • isLiveEdit
  • isModule
  • length
  • scriptId
  • sourceMapURL
  • stackTrace
  • startColumn
  • startLine
  • url
Debugger.ScriptPosition

Location in the source code.

  • columnNumber
  • lineNumber
Debugger.SearchInContentParameterType
No documentation available
  • caseSensitive
  • isRegex
  • query
  • scriptId
Debugger.SearchInContentReturnType
No documentation available
  • result
Debugger.SearchMatch

Search match for resource.

  • lineContent
  • lineNumber
Debugger.SetAsyncCallStackDepthParameterType
No documentation available
  • maxDepth
Debugger.SetBlackboxedRangesParameterType
No documentation available
  • positions
  • scriptId
Debugger.SetBlackboxPatternsParameterType
No documentation available
  • patterns
Debugger.SetBreakpointByUrlParameterType
No documentation available
  • columnNumber
  • condition
  • lineNumber
  • scriptHash
  • url
  • urlRegex
Debugger.SetBreakpointByUrlReturnType
No documentation available
  • breakpointId
  • locations
Debugger.SetBreakpointParameterType
No documentation available
  • condition
  • location
Debugger.SetBreakpointReturnType
No documentation available
  • actualLocation
  • breakpointId
Debugger.SetBreakpointsActiveParameterType
No documentation available
  • active
Debugger.SetPauseOnExceptionsParameterType
No documentation available
  • state
Debugger.SetReturnValueParameterType
No documentation available
  • newValue
Debugger.SetScriptSourceParameterType
No documentation available
  • dryRun
  • scriptId
  • scriptSource
Debugger.SetScriptSourceReturnType
No documentation available
  • asyncStackTrace
  • asyncStackTraceId
  • callFrames
  • exceptionDetails
  • stackChanged
Debugger.SetSkipAllPausesParameterType
No documentation available
  • skip
Debugger.SetVariableValueParameterType
No documentation available
  • callFrameId
  • newValue
  • scopeNumber
  • variableName
Debugger.StepIntoParameterType
No documentation available
  • breakOnAsyncCall

Type Aliases

Debugger.BreakpointId

Breakpoint identifier.

Debugger.CallFrameId

Call frame identifier.


namespace HeapProfiler

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Interfaces

HeapProfiler.AddHeapSnapshotChunkEventDataType
No documentation available
  • chunk
HeapProfiler.AddInspectedHeapObjectParameterType
No documentation available
  • heapObjectId
HeapProfiler.GetHeapObjectIdParameterType
No documentation available
  • objectId
HeapProfiler.GetHeapObjectIdReturnType
No documentation available
  • heapSnapshotObjectId
HeapProfiler.GetObjectByHeapObjectIdParameterType
No documentation available
  • objectGroup
  • objectId
HeapProfiler.GetObjectByHeapObjectIdReturnType
No documentation available
  • result
HeapProfiler.GetSamplingProfileReturnType
No documentation available
  • profile
HeapProfiler.HeapStatsUpdateEventDataType
No documentation available
  • statsUpdate
HeapProfiler.LastSeenObjectIdEventDataType
No documentation available
  • lastSeenObjectId
  • timestamp
HeapProfiler.ReportHeapSnapshotProgressEventDataType
No documentation available
  • done
  • finished
  • total
HeapProfiler.SamplingHeapProfile

Profile.

  • head
HeapProfiler.SamplingHeapProfileNode

Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.

  • callFrame
  • children
  • selfSize
HeapProfiler.StartSamplingParameterType
No documentation available
  • samplingInterval
HeapProfiler.StartTrackingHeapObjectsParameterType
No documentation available
  • trackAllocations
HeapProfiler.StopSamplingReturnType
No documentation available
  • profile
HeapProfiler.StopTrackingHeapObjectsParameterType
No documentation available
  • reportProgress
HeapProfiler.TakeHeapSnapshotParameterType
No documentation available
  • reportProgress

Type Aliases

HeapProfiler.HeapSnapshotObjectId

Heap snapshot object id.


namespace Network

Usage in Deno

import { Network } from "node:inspector/promises";

Functions

Network.loadingFailed

This feature is only available with the --experimental-network-inspection flag enabled.

Network.loadingFinished

This feature is only available with the --experimental-network-inspection flag enabled.

Network.requestWillBeSent

This feature is only available with the --experimental-network-inspection flag enabled.

Network.responseReceived

This feature is only available with the --experimental-network-inspection flag enabled.

Interfaces

Network.Headers

Request / response headers as keys / values of JSON object.

Network.LoadingFailedEventDataType
No documentation available
  • errorText
  • requestId
  • timestamp
  • type
Network.LoadingFinishedEventDataType
No documentation available
  • requestId
  • timestamp
Network.Request

HTTP request data.

  • headers
  • method
  • url
Network.RequestWillBeSentEventDataType
No documentation available
  • request
  • requestId
  • timestamp
  • wallTime
Network.Response

HTTP response data.

  • headers
  • status
  • statusText
  • url
Network.ResponseReceivedEventDataType
No documentation available
  • requestId
  • response
  • timestamp
  • type

Type Aliases

Network.MonotonicTime

Monotonically increasing time in seconds since an arbitrary point in the past.

Network.RequestId

Unique request identifier.

Network.ResourceType

Resource type as it was perceived by the rendering engine.

Network.TimeSinceEpoch

UTC time in seconds, counted from January 1, 1970.


namespace NodeRuntime

Usage in Deno

import { NodeRuntime } from "node:inspector/promises";

Interfaces

NodeRuntime.NotifyWhenWaitingForDisconnectParameterType
No documentation available
  • enabled

namespace NodeTracing

Usage in Deno

import { NodeTracing } from "node:inspector/promises";

Interfaces

NodeTracing.DataCollectedEventDataType
No documentation available
  • value
NodeTracing.GetCategoriesReturnType
No documentation available
  • categories
NodeTracing.StartParameterType
No documentation available
  • traceConfig
NodeTracing.TraceConfig
No documentation available
  • includedCategories
  • recordMode

namespace NodeWorker

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Interfaces

NodeWorker.AttachedToWorkerEventDataType
No documentation available
  • sessionId
  • waitingForDebugger
  • workerInfo
NodeWorker.DetachedFromWorkerEventDataType
No documentation available
  • sessionId
NodeWorker.DetachParameterType
No documentation available
  • sessionId
NodeWorker.EnableParameterType
No documentation available
  • waitForDebuggerOnStart
NodeWorker.ReceivedMessageFromWorkerEventDataType
No documentation available
  • message
  • sessionId
NodeWorker.SendMessageToWorkerParameterType
No documentation available
  • message
  • sessionId
NodeWorker.WorkerInfo
No documentation available
  • title
  • type
  • url
  • workerId

Type Aliases

NodeWorker.SessionID

Unique identifier of attached debugging session.

NodeWorker.WorkerID
No documentation available

namespace Profiler

Usage in Deno

import { Profiler } from "node:inspector/promises";

Interfaces

Profiler.ConsoleProfileFinishedEventDataType
No documentation available
  • id
  • location
  • profile
  • title
Profiler.ConsoleProfileStartedEventDataType
No documentation available
  • id
  • location
  • title
Profiler.CoverageRange

Coverage data for a source range.

  • count
  • endOffset
  • startOffset
Profiler.FunctionCoverage

Coverage data for a JavaScript function.

  • functionName
  • isBlockCoverage
  • ranges
Profiler.GetBestEffortCoverageReturnType
No documentation available
  • result
Profiler.PositionTickInfo

Specifies a number of samples attributed to a certain source position.

  • line
  • ticks
Profiler.Profile

Profile.

  • endTime
  • nodes
  • samples
  • startTime
  • timeDeltas
Profiler.ProfileNode

Profile node. Holds callsite information, execution statistics and child nodes.

  • callFrame
  • children
  • deoptReason
  • hitCount
  • id
  • positionTicks
Profiler.ScriptCoverage

Coverage data for a JavaScript script.

  • functions
  • scriptId
  • url
Profiler.SetSamplingIntervalParameterType
No documentation available
  • interval
Profiler.StartPreciseCoverageParameterType
No documentation available
  • callCount
  • detailed
Profiler.StopReturnType
No documentation available
  • profile
Profiler.TakePreciseCoverageReturnType
No documentation available
  • result

namespace Runtime

Usage in Deno

import { Runtime } from "node:inspector/promises";

Interfaces

Runtime.AwaitPromiseParameterType
No documentation available
  • generatePreview
  • promiseObjectId
  • returnByValue
Runtime.AwaitPromiseReturnType
No documentation available
  • exceptionDetails
  • result
Runtime.CallArgument

Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.

  • objectId
  • unserializableValue
  • value
Runtime.CallFrame

Stack entry for runtime errors and assertions.

  • columnNumber
  • functionName
  • lineNumber
  • scriptId
  • url
Runtime.CallFunctionOnParameterType
No documentation available
  • arguments
  • awaitPromise
  • executionContextId
  • functionDeclaration
  • generatePreview
  • objectGroup
  • objectId
  • returnByValue
  • silent
  • userGesture
Runtime.CallFunctionOnReturnType
No documentation available
  • exceptionDetails
  • result
Runtime.CompileScriptParameterType
No documentation available
  • executionContextId
  • expression
  • persistScript
  • sourceURL
Runtime.CompileScriptReturnType
No documentation available
  • exceptionDetails
  • scriptId
Runtime.ConsoleAPICalledEventDataType
No documentation available
  • args
  • context
  • executionContextId
  • stackTrace
  • timestamp
  • type
Runtime.CustomPreview
No documentation available
  • bindRemoteObjectFunctionId
  • configObjectId
  • formatterObjectId
  • hasBody
  • header
Runtime.EntryPreview
No documentation available
  • key
  • value
Runtime.EvaluateParameterType
No documentation available
  • awaitPromise
  • contextId
  • expression
  • generatePreview
  • includeCommandLineAPI
  • objectGroup
  • returnByValue
  • silent
  • userGesture
Runtime.EvaluateReturnType
No documentation available
  • exceptionDetails
  • result
Runtime.ExceptionDetails

Detailed information about exception (or error) that was thrown during script compilation or execution.

  • columnNumber
  • exception
  • exceptionId
  • executionContextId
  • lineNumber
  • scriptId
  • stackTrace
  • text
  • url
Runtime.ExceptionRevokedEventDataType
No documentation available
  • exceptionId
  • reason
Runtime.ExceptionThrownEventDataType
No documentation available
  • exceptionDetails
  • timestamp
Runtime.ExecutionContextCreatedEventDataType
No documentation available
  • context
Runtime.ExecutionContextDescription

Description of an isolated world.

  • auxData
  • id
  • name
  • origin
Runtime.ExecutionContextDestroyedEventDataType
No documentation available
  • executionContextId
Runtime.GetPropertiesParameterType
No documentation available
  • accessorPropertiesOnly
  • generatePreview
  • objectId
  • ownProperties
Runtime.GetPropertiesReturnType
No documentation available
  • exceptionDetails
  • internalProperties
  • result
Runtime.GlobalLexicalScopeNamesParameterType
No documentation available
  • executionContextId
Runtime.GlobalLexicalScopeNamesReturnType
No documentation available
  • names
Runtime.InspectRequestedEventDataType
No documentation available
  • hints
  • object
Runtime.InternalPropertyDescriptor

Object internal property descriptor. This property isn't normally visible in JavaScript code.

  • name
  • value
Runtime.ObjectPreview

Object containing abbreviated remote object value.

  • description
  • entries
  • overflow
  • properties
  • subtype
  • type
Runtime.PropertyDescriptor

Object property descriptor.

  • configurable
  • enumerable
  • get
  • isOwn
  • name
  • set
  • symbol
  • value
  • wasThrown
  • writable
Runtime.PropertyPreview
No documentation available
  • name
  • subtype
  • type
  • value
  • valuePreview
Runtime.QueryObjectsParameterType
No documentation available
  • prototypeObjectId
Runtime.QueryObjectsReturnType
No documentation available
  • objects
Runtime.ReleaseObjectGroupParameterType
No documentation available
  • objectGroup
Runtime.ReleaseObjectParameterType
No documentation available
  • objectId
Runtime.RemoteObject

Mirror object referencing original JavaScript object.

  • className
  • customPreview
  • description
  • objectId
  • preview
  • subtype
  • type
  • unserializableValue
  • value
Runtime.RunScriptParameterType
No documentation available
  • awaitPromise
  • executionContextId
  • generatePreview
  • includeCommandLineAPI
  • objectGroup
  • returnByValue
  • scriptId
  • silent
Runtime.RunScriptReturnType
No documentation available
  • exceptionDetails
  • result
Runtime.SetCustomObjectFormatterEnabledParameterType
No documentation available
  • enabled
Runtime.StackTrace

Call frames for assertions or error messages.

  • callFrames
  • description
  • parent
  • parentId
Runtime.StackTraceId

If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages.

  • debuggerId
  • id

Type Aliases

Runtime.ExecutionContextId

Id of an execution context.

Runtime.RemoteObjectId

Unique object identifier.

Runtime.ScriptId

Unique script identifier.

Runtime.Timestamp

Number of milliseconds since epoch.

Runtime.UniqueDebuggerId

Unique identifier of current debugger.

Runtime.UnserializableValue

Primitive value which cannot be JSON-stringified.


namespace Schema

Usage in Deno

import { Schema } from "node:inspector/promises";

Interfaces

Schema.Domain

Description of the protocol domain.

  • name
  • version
Schema.GetDomainsReturnType
No documentation available
  • domains

type alias Debugger.BreakpointId

Usage in Deno

import { Debugger } from "node:inspector/promises";

Breakpoint identifier.

Definition

string

type alias Debugger.CallFrameId

Usage in Deno

import { Debugger } from "node:inspector/promises";

Call frame identifier.

Definition

string

type alias HeapProfiler.HeapSnapshotObjectId

Usage in Deno

import { HeapProfiler } from "node:inspector/promises";

Heap snapshot object id.

Definition

string

type alias Network.MonotonicTime

Usage in Deno

import { Network } from "node:inspector/promises";

Monotonically increasing time in seconds since an arbitrary point in the past.

Definition

number

type alias Network.RequestId

Usage in Deno

import { Network } from "node:inspector/promises";

Unique request identifier.

Definition

string

type alias Network.ResourceType

Usage in Deno

import { Network } from "node:inspector/promises";

Resource type as it was perceived by the rendering engine.

Definition

string

type alias Network.TimeSinceEpoch

Usage in Deno

import { Network } from "node:inspector/promises";

UTC time in seconds, counted from January 1, 1970.

Definition

number

type alias NodeWorker.SessionID

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Unique identifier of attached debugging session.

Definition

string

type alias NodeWorker.WorkerID

Usage in Deno

import { NodeWorker } from "node:inspector/promises";

Definition

string

type alias Runtime.ExecutionContextId

Usage in Deno

import { Runtime } from "node:inspector/promises";

Id of an execution context.

Definition

number

type alias Runtime.RemoteObjectId

Usage in Deno

import { Runtime } from "node:inspector/promises";

Unique object identifier.

Definition

string

type alias Runtime.ScriptId

Usage in Deno

import { Runtime } from "node:inspector/promises";

Unique script identifier.

Definition

string

type alias Runtime.Timestamp

Usage in Deno

import { Runtime } from "node:inspector/promises";

Number of milliseconds since epoch.

Definition

number

type alias Runtime.UniqueDebuggerId

unstable

Usage in Deno

import { Runtime } from "node:inspector/promises";

Unique identifier of current debugger.

Definition

string

type alias Runtime.UnserializableValue

Usage in Deno

import { Runtime } from "node:inspector/promises";

Primitive value which cannot be JSON-stringified.

Definition

string

variable console

Usage in Deno

import { console } from "node:inspector/promises";

An object to send messages to the remote inspector console.

Type

InspectorConsole

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/api/node/inspector/promises

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API