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
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() 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",
): boolean emit(
event: "Runtime.executionContextDestroyed",
): boolean emit(event: "Runtime.executionContextsCleared"): boolean emit(
event: "Runtime.exceptionThrown",
): boolean emit(
event: "Runtime.exceptionRevoked",
): boolean emit(
event: "Runtime.consoleAPICalled",
): boolean emit(
event: "Runtime.inspectRequested",
): boolean emit(
event: "Debugger.scriptParsed",
): boolean emit(
event: "Debugger.scriptFailedToParse",
): boolean emit(
event: "Debugger.breakpointResolved",
): boolean emit(
event: "Debugger.paused",
): boolean emit(event: "Debugger.resumed"): boolean emit(
event: "Console.messageAdded",
): boolean emit(
event: "Profiler.consoleProfileStarted",
): boolean emit(
event: "Profiler.consoleProfileFinished",
): boolean emit(
event: "HeapProfiler.addHeapSnapshotChunk",
): boolean emit(event: "HeapProfiler.resetProfiles"): boolean emit(
event: "HeapProfiler.reportHeapSnapshotProgress",
): boolean emit(
event: "HeapProfiler.lastSeenObjectId",
): boolean emit(
event: "HeapProfiler.heapStatsUpdate",
): boolean emit(
event: "NodeTracing.dataCollected",
): boolean emit(event: "NodeTracing.tracingComplete"): boolean emit(
event: "NodeWorker.attachedToWorker",
): boolean emit(
event: "NodeWorker.detachedFromWorker",
): boolean emit(
event: "NodeWorker.receivedMessageFromWorker",
): boolean emit(
event: "Network.requestWillBeSent",
): boolean emit(
event: "Network.responseReceived",
): boolean emit(
event: "Network.loadingFailed",
): boolean emit(
event: "Network.loadingFinished",
): 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",
): 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",
): 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",
): 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",
): 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",
): 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",
): 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",
): Promise<void> Enables or disables async call stacks tracking.
post(
method: "Debugger.setBlackboxPatterns",
): Promise<void> Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
post(
method: "Debugger.setBlackboxedRanges",
): Promise<void> Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
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",
): 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",
): 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",
): Promise<void> post(
method: "HeapProfiler.stopTrackingHeapObjects",
): Promise<void> post(
method: "HeapProfiler.takeHeapSnapshot",
): Promise<void> post(method: "HeapProfiler.collectGarbage"): Promise<void> post(
method: "HeapProfiler.getObjectByHeapObjectId",
): Promise<HeapProfiler.GetObjectByHeapObjectIdReturnType> post(
method: "HeapProfiler.addInspectedHeapObject",
): Promise<void> Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
post(
method: "HeapProfiler.getHeapObjectId",
): 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",
): 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",
): 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(): voidDeactivate the inspector. Blocks until there are no active connections.
Return Type
void function Network.loadingFailed
Usage in Deno
import { Network } from "node:inspector/promises";
loadingFailed(params: LoadingFailedEventDataType): voidThis 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
Usage in Deno
import { Network } from "node:inspector/promises";
loadingFinished(params: LoadingFinishedEventDataType): voidThis 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
Usage in Deno
import { Network } from "node:inspector/promises";
requestWillBeSent(params: RequestWillBeSentEventDataType): voidThis 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
Usage in Deno
import { Network } from "node:inspector/promises";
responseReceived(params: ResponseReceivedEventDataType): voidThis 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,
): DisposableActivate 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 Port to listen on for inspector connections. Defaults to what was specified on the CLI.
host: string Host to listen on for inspector connections. Defaults to what was specified on the CLI.
wait: boolean 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 | undefinedReturn 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(): voidBlocks 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 URL of the message origin.
line: number | undefined Line number in the resource that generated this message (1-based).
column: number | undefined Column number in the resource that generated this message (1-based).
interface Console.MessageAddedEventDataType
Usage in Deno
import { Console } from "node:inspector/promises";
Properties
Console message that has been added.
interface Debugger.BreakLocation
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Script identifier as reported in the Debugger.scriptParsed.
lineNumber: number Line number in the script (0-based).
columnNumber: number | undefined Column number in the script (0-based).
type: string | undefined interface Debugger.BreakpointResolvedEventDataType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Breakpoint unique identifier.
interface Debugger.CallFrame
Usage in Deno
import { Debugger } from "node:inspector/promises";
JavaScript call frame. Array of call frames form the call stack.
Properties
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 Location in the source code.
url: string JavaScript script name or url.
scopeChain: Scope[] Scope chain for this call frame.
this object for this call frame.
returnValue: Runtime.RemoteObject | undefined The value being returned, if the function is at return point.
interface Debugger.ContinueToLocationParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
targetCallFrames: string | undefined interface Debugger.EnableReturnType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Unique identifier of the debugger.
interface Debugger.EvaluateOnCallFrameParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Call frame identifier to evaluate on.
expression: string Expression to evaluate.
objectGroup: string | undefined String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).
includeCommandLineAPI: boolean | undefined Specifies whether command line API should be available to the evaluated expression, defaults to false.
silent: boolean | undefined In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
returnByValue: boolean | undefined Whether the result is expected to be a JSON object that should be sent by value.
generatePreview: boolean | undefined Whether preview should be generated for the result.
throwOnSideEffect: boolean | undefined 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
Object wrapper for the evaluation result.
exceptionDetails: Runtime.ExceptionDetails | undefined Exception details.
interface Debugger.GetPossibleBreakpointsParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
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 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
List of the possible breakpoint locations.
interface Debugger.GetScriptSourceParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
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
interface Debugger.GetStackTraceReturnType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
interface Debugger.Location
Usage in Deno
import { Debugger } from "node:inspector/promises";
Location in the source code.
Properties
Script identifier as reported in the Debugger.scriptParsed.
lineNumber: number Line number in the script (0-based).
columnNumber: number | undefined Column number in the script (0-based).
interface Debugger.PausedEventDataType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Call stack the virtual machine stopped on.
reason: string Pause reason.
data: { } | undefined Object containing break-specific auxiliary properties.
hitBreakpoints: string[] | undefined Hit breakpoints IDs
asyncStackTrace: Runtime.StackTrace | undefined Async stack trace, if any.
asyncStackTraceId: Runtime.StackTraceId | undefined Async stack trace, if any.
asyncCallStackTraceId: Runtime.StackTraceId | undefined 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
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
interface Debugger.RestartFrameParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Call frame identifier to evaluate on.
interface Debugger.RestartFrameReturnType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
New stack trace.
asyncStackTrace: Runtime.StackTrace | undefined Async stack trace, if any.
asyncStackTraceId: Runtime.StackTraceId | undefined 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 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 startLocation: Location | undefined Location in the source code where scope starts
endLocation: Location | undefined Location in the source code where scope ends
interface Debugger.ScriptFailedToParseEventDataType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
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.
Specifies script creation context.
hash: string Content hash of the script.
executionContextAuxData: { } | undefined Embedder-specific auxiliary data.
sourceMapURL: string | undefined URL of source map associated with script (if any).
hasSourceURL: boolean | undefined True, if this script has sourceURL.
isModule: boolean | undefined True, if this script is ES6 module.
length: number | undefined This script length.
stackTrace: Runtime.StackTrace | undefined 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
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.
Specifies script creation context.
hash: string Content hash of the script.
executionContextAuxData: { } | undefined Embedder-specific auxiliary data.
isLiveEdit: boolean | undefined True, if this script is generated as a result of the live edit operation.
sourceMapURL: string | undefined URL of source map associated with script (if any).
hasSourceURL: boolean | undefined True, if this script has sourceURL.
isModule: boolean | undefined True, if this script is ES6 module.
length: number | undefined This script length.
stackTrace: Runtime.StackTrace | undefined JavaScript top stack frame of where the script parsed event was triggered if available.
interface Debugger.ScriptPosition
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
Id of the script to search in.
query: string String to search for.
caseSensitive: boolean | undefined If true, search is case sensitive.
isRegex: boolean | undefined If true, treats string parameter as regex.
interface Debugger.SearchInContentReturnType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
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
Id of the script.
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 URL of the resources to set breakpoint on.
urlRegex: string | undefined Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.
scriptHash: string | undefined Script hash of the resources to set breakpoint on.
columnNumber: number | undefined Offset in the line to set breakpoint at.
condition: string | undefined 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
Id of the created breakpoint for further reference.
interface Debugger.SetBreakpointParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
interface Debugger.SetBreakpointReturnType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Id of the created breakpoint for further reference.
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
New return value.
interface Debugger.SetScriptSourceParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
Id of the script to edit.
scriptSource: string New content of the script.
dryRun: boolean | undefined 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 New stack trace in case editing has happened while VM was stopped.
stackChanged: boolean | undefined Whether current call stack was modified after applying the changes.
asyncStackTrace: Runtime.StackTrace | undefined Async stack trace, if any.
asyncStackTraceId: Runtime.StackTraceId | undefined Async stack trace, if any.
exceptionDetails: Runtime.ExceptionDetails | undefined 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.
New variable value.
Id of callframe that holds variable.
interface Debugger.StepIntoParameterType
Usage in Deno
import { Debugger } from "node:inspector/promises";
Properties
breakOnAsyncCall: boolean | undefined 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
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
Identifier of the object to get heap object id for.
interface HeapProfiler.GetHeapObjectIdReturnType
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Properties
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
objectGroup: string | undefined Symbolic group name that can be used to release multiple objects.
interface HeapProfiler.GetObjectByHeapObjectIdReturnType
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Properties
Evaluation result.
interface HeapProfiler.GetSamplingProfileReturnType
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Properties
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";
interface HeapProfiler.SamplingHeapProfile
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Profile.
Properties
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
Function location.
selfSize: number Allocations size in bytes for the node excluding children.
Child nodes.
interface HeapProfiler.StartSamplingParameterType
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Properties
samplingInterval: number | undefined 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 interface HeapProfiler.StopSamplingReturnType
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Properties
Recorded sampling heap profile.
interface HeapProfiler.StopTrackingHeapObjectsParameterType
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Properties
reportProgress: boolean | undefined 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 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
interface Network.LoadingFinishedEventDataType
Usage in Deno
import { Network } from "node:inspector/promises";
Properties
Timestamp.
interface Network.Request
Usage in Deno
import { Network } from "node:inspector/promises";
interface Network.RequestWillBeSentEventDataType
Usage in Deno
import { Network } from "node:inspector/promises";
Properties
Timestamp.
Timestamp.
interface Network.Response
Usage in Deno
import { Network } from "node:inspector/promises";
HTTP response data.
Properties
interface Network.ResponseReceivedEventDataType
Usage in Deno
import { Network } from "node:inspector/promises";
Properties
Timestamp.
Resource type.
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
interface NodeTracing.TraceConfig
Usage in Deno
import { NodeTracing } from "node:inspector/promises";
Properties
recordMode: string | undefined 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
waitingForDebugger: boolean interface NodeWorker.DetachedFromWorkerEventDataType
Usage in Deno
import { NodeWorker } from "node:inspector/promises";
interface NodeWorker.DetachParameterType
Usage in Deno
import { NodeWorker } from "node:inspector/promises";
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";
interface NodeWorker.SendMessageToWorkerParameterType
Usage in Deno
import { NodeWorker } from "node:inspector/promises";
interface Profiler.ConsoleProfileFinishedEventDataType
Usage in Deno
import { Profiler } from "node:inspector/promises";
interface Profiler.ConsoleProfileStartedEventDataType
Usage in Deno
import { Profiler } from "node:inspector/promises";
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.
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
Coverage data for the current isolate.
interface Profiler.PositionTickInfo
Usage in Deno
import { Profiler } from "node:inspector/promises";
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 Ids of samples top nodes.
timeDeltas: number[] | undefined 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.
Function location.
hitCount: number | undefined Number of samples where this node was on top of the call stack.
children: number[] | undefined Child node ids.
deoptReason: string | undefined The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
positionTicks: PositionTickInfo[] | undefined 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
JavaScript script id.
url: string JavaScript script name or url.
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";
interface Profiler.StopReturnType
Usage in Deno
import { Profiler } from "node:inspector/promises";
interface Profiler.TakePreciseCoverageReturnType
Usage in Deno
import { Profiler } from "node:inspector/promises";
Properties
Coverage data for the current isolate.
interface Runtime.AwaitPromiseParameterType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
Identifier of the promise.
returnByValue: boolean | undefined Whether the result is expected to be a JSON object that should be sent by value.
generatePreview: boolean | undefined Whether preview should be generated for the result.
interface Runtime.AwaitPromiseReturnType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
Promise result. Will contain rejected value if promise was rejected.
exceptionDetails: ExceptionDetails | undefined 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 Primitive value or serializable javascript object.
unserializableValue: UnserializableValue | undefined Primitive value which can not be JSON-stringified.
objectId: RemoteObjectId | undefined 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.
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 Identifier of the object to call function on. Either objectId or executionContextId should be specified.
arguments: CallArgument[] | undefined Call arguments. All call arguments must belong to the same JavaScript world as the target object.
silent: boolean | undefined In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
returnByValue: boolean | undefined Whether the result is expected to be a JSON object which should be sent by value.
generatePreview: boolean | undefined Whether preview should be generated for the result.
userGesture: boolean | undefined Whether execution should be treated as initiated by user in the UI.
awaitPromise: boolean | undefined Whether execution should await for resulting value and return once awaited promise is resolved.
executionContextId: ExecutionContextId | undefined Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
objectGroup: string | undefined 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
Call result.
exceptionDetails: ExceptionDetails | undefined 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 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
exceptionDetails: ExceptionDetails | undefined 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.
Identifier of the context where the call was made.
stackTrace: StackTrace | undefined Stack trace captured when the call was made.
context: string | undefined 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
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
interface Runtime.EntryPreview
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
key: ObjectPreview | undefined Preview of the key. Specified for map-like collection entries.
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 Symbolic group name that can be used to release multiple objects.
includeCommandLineAPI: boolean | undefined Determines whether Command Line API should be available during the evaluation.
silent: boolean | undefined In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
contextId: ExecutionContextId | undefined 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 Whether the result is expected to be a JSON object that should be sent by value.
generatePreview: boolean | undefined Whether preview should be generated for the result.
userGesture: boolean | undefined Whether execution should be treated as initiated by user in the UI.
awaitPromise: boolean | undefined 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
Evaluation result.
exceptionDetails: ExceptionDetails | undefined 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).
url: string | undefined URL of the exception location, to be used when the script was not reported.
stackTrace: StackTrace | undefined JavaScript stack trace if available.
exception: RemoteObject | undefined Exception object if available.
executionContextId: ExecutionContextId | undefined 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
interface Runtime.ExecutionContextCreatedEventDataType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
A newly created execution context.
interface Runtime.ExecutionContextDescription
Usage in Deno
import { Runtime } from "node:inspector/promises";
Description of an isolated world.
Properties
interface Runtime.ExecutionContextDestroyedEventDataType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
Id of the destroyed context
interface Runtime.GetPropertiesParameterType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
Identifier of the object to return properties for.
ownProperties: boolean | undefined If true, returns properties belonging only to the element itself, not to its prototype chain.
accessorPropertiesOnly: boolean | undefined If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
generatePreview: boolean | undefined Whether preview should be generated for the results.
interface Runtime.GetPropertiesReturnType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
Object properties.
internalProperties: InternalPropertyDescriptor[] | undefined Internal object properties (only of the element itself).
exceptionDetails: ExceptionDetails | undefined Exception details.
interface Runtime.GlobalLexicalScopeNamesParameterType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
executionContextId: ExecutionContextId | undefined 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
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 The value associated with the property.
interface Runtime.ObjectPreview
Usage in Deno
import { Runtime } from "node:inspector/promises";
Object containing abbreviated remote object value.
Properties
type: string Object type.
subtype: string | undefined Object subtype hint. Specified for object type values only.
description: string | undefined String representation of the object.
overflow: boolean True iff some of the properties or entries of the original object did not fit.
List of the properties.
entries: EntryPreview[] | undefined 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 The value associated with the property.
writable: boolean | undefined True if the value associated with the property may be changed (data descriptors only).
get: RemoteObject | undefined A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).
set: RemoteObject | undefined 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 True if the result was thrown during the evaluation.
isOwn: boolean | undefined True if the property is owned for the object.
symbol: RemoteObject | undefined Property symbol object, if the property is of the symbol type.
interface Runtime.PropertyPreview
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 User-friendly property value string.
valuePreview: ObjectPreview | undefined Nested value preview.
subtype: string | undefined Object subtype hint. Specified for object type values only.
interface Runtime.QueryObjectsParameterType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
Identifier of the prototype to return objects for.
interface Runtime.QueryObjectsReturnType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
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
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 Object subtype hint. Specified for object type values only.
className: string | undefined Object class (constructor) name. Specified for object type values only.
value: any Remote object value in case of primitive values or JSON values (if it was requested).
unserializableValue: UnserializableValue | undefined Primitive value which can not be JSON-stringified does not have value, but gets this property.
description: string | undefined String representation of the object.
objectId: RemoteObjectId | undefined Unique object identifier (for non-primitive values).
preview: ObjectPreview | undefined Preview containing abbreviated property values. Specified for object type values only.
customPreview: CustomPreview | undefined interface Runtime.RunScriptParameterType
Usage in Deno
import { Runtime } from "node:inspector/promises";
Properties
executionContextId: ExecutionContextId | undefined 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 Symbolic group name that can be used to release multiple objects.
silent: boolean | undefined In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
includeCommandLineAPI: boolean | undefined Determines whether Command Line API should be available during the evaluation.
returnByValue: boolean | undefined Whether the result is expected to be a JSON object which should be sent by value.
generatePreview: boolean | undefined Whether preview should be generated for the result.
awaitPromise: boolean | undefined 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
Run result.
exceptionDetails: ExceptionDetails | undefined 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 String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
JavaScript function name.
parent: StackTrace | undefined Asynchronous JavaScript stack trace that preceded this stack, if available.
parentId: StackTraceId | undefined Asynchronous JavaScript stack trace that preceded this stack, if available.
interface Runtime.StackTraceId
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 interface Schema.Domain
Usage in Deno
import { Schema } from "node:inspector/promises";
interface Schema.GetDomainsReturnType
Usage in Deno
import { Schema } from "node:inspector/promises";
namespace Debugger
Usage in Deno
import { Debugger } from "node:inspector/promises";
Interfaces
JavaScript call frame. Array of call frames form the call stack.
Type Aliases
Breakpoint identifier.
Call frame identifier.
namespace HeapProfiler
Usage in Deno
import { HeapProfiler } from "node:inspector/promises";
Interfaces
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
Type Aliases
Heap snapshot object id.
namespace Network
Usage in Deno
import { Network } from "node:inspector/promises";
Functions
This feature is only available with the --experimental-network-inspection flag enabled.
This feature is only available with the --experimental-network-inspection flag enabled.
This feature is only available with the --experimental-network-inspection flag enabled.
This feature is only available with the --experimental-network-inspection flag enabled.
Interfaces
Request / response headers as keys / values of JSON object.
Type Aliases
Monotonically increasing time in seconds since an arbitrary point in the past.
Unique request identifier.
Resource type as it was perceived by the rendering engine.
UTC time in seconds, counted from January 1, 1970.
namespace NodeRuntime
Usage in Deno
import { NodeRuntime } from "node:inspector/promises";
Interfaces
namespace NodeTracing
Usage in Deno
import { NodeTracing } from "node:inspector/promises";
Interfaces
namespace NodeWorker
Usage in Deno
import { NodeWorker } from "node:inspector/promises";
Interfaces
Type Aliases
Unique identifier of attached debugging session.
namespace Profiler
Usage in Deno
import { Profiler } from "node:inspector/promises";
Interfaces
Coverage data for a JavaScript function.
Specifies a number of samples attributed to a certain source position.
Profile node. Holds callsite information, execution statistics and child nodes.
namespace Runtime
Usage in Deno
import { Runtime } from "node:inspector/promises";
Interfaces
Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.
Stack entry for runtime errors and assertions.
Detailed information about exception (or error) that was thrown during script compilation or execution.
Object internal property descriptor. This property isn't normally visible in JavaScript code.
Object containing abbreviated remote object value.
Object property descriptor.
Mirror object referencing original JavaScript object.
Call frames for assertions or error messages.
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.
Type Aliases
Id of an execution context.
Unique object identifier.
Unique script identifier.
Number of milliseconds since epoch.
Unique identifier of current debugger.
Primitive value which cannot be JSON-stringified.
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
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