Skip to main content
node__inspector--promises.d.ts - Node documentation

Usage in Deno

```typescript import * as mod from "node:node__inspector--promises.d.ts"; ```
The `node:inspector/promises` module provides an API for interacting with the V8 inspector.

Classes

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

Functions

f
close
Deactivate the inspector. Blocks until there are no active connections.
f
Network.loadingFailed
This feature is only available with the `--experimental-network-inspection` flag enabled. Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that HTTP request has failed to load.
f
Network.loadingFinished
This feature is only available with the `--experimental-network-inspection` flag enabled. Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that HTTP request has finished loading.
f
Network.requestWillBeSent
This feature is only available with the `--experimental-network-inspection` flag enabled. Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that the application is about to send an HTTP request.
f
Network.responseReceived
This feature is only available with the `--experimental-network-inspection` flag enabled. Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that HTTP response is available.
f
open
Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has started. If wait is `true`, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. See the [security warning](https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) regarding the `host` parameter usage.
f
url
Return the URL of the active inspector, or `undefined` if there is none. ```console $ 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 ```
f
waitForDebugger
Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. An exception will be thrown if there is no active inspector.

Interfaces

I
Console.MessageAddedEventDataType
No documentation available
I
Debugger.CallFrame
JavaScript call frame. Array of call frames form the call stack.
I
Debugger.EnableReturnType
No documentation available
I
I
Debugger.GetStackTraceReturnType
No documentation available
I
I
I
Debugger.ScriptPosition
Location in the source code.
I
Debugger.SearchInContentReturnType
No documentation available
I
Debugger.SearchMatch
Search match for resource.
I
I
Debugger.SetSkipAllPausesParameterType
No documentation available
I
HeapProfiler.SamplingHeapProfileNode
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
I
HeapProfiler.StopSamplingReturnType
No documentation available
I
InspectorNotification
No documentation available
I
Network.Headers
Request / response headers as keys / values of JSON object.
I
I
I
I
NodeTracing.StartParameterType
No documentation available
I
NodeWorker.DetachParameterType
No documentation available
I
NodeWorker.WorkerInfo
No documentation available
I
Profiler.CoverageRange
Coverage data for a source range.
I
Profiler.FunctionCoverage
Coverage data for a JavaScript function.
I
Profiler.PositionTickInfo
Specifies a number of samples attributed to a certain source position.
I
Profiler.ProfileNode
Profile node. Holds callsite information, execution statistics and child nodes.
I
Profiler.ScriptCoverage
Coverage data for a JavaScript script.
I
Profiler.StopReturnType
No documentation available
I
I
Runtime.CallArgument
Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.
I
Runtime.CallFrame
Stack entry for runtime errors and assertions.
I
Runtime.EntryPreview
No documentation available
I
Runtime.ExceptionDetails
Detailed information about exception (or error) that was thrown during script compilation or execution.
I
I
Runtime.InternalPropertyDescriptor
Object internal property descriptor. This property isn't normally visible in JavaScript code.
I
Runtime.ObjectPreview
Object containing abbreviated remote object value.
I
Runtime.QueryObjectsReturnType
No documentation available
I
Runtime.ReleaseObjectParameterType
No documentation available
I
Runtime.StackTrace
Call frames for assertions or error messages.
I
Runtime.StackTraceId
If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages.
I
Schema.Domain
Description of the protocol domain.
I
Schema.GetDomainsReturnType
No documentation available

Namespaces

N
Console
No documentation available
N
Debugger
No documentation available
N
HeapProfiler
No documentation available
N
Network
No documentation available
N
NodeRuntime
No documentation available
N
NodeTracing
No documentation available
N
NodeWorker
No documentation available
N
Profiler
No documentation available
N
Runtime
No documentation available
N
Schema
No documentation available

Type Aliases

T
Debugger.BreakpointId
Breakpoint identifier.
T
Debugger.CallFrameId
Call frame identifier.
T
HeapProfiler.HeapSnapshotObjectId
Heap snapshot object id.
T
Network.MonotonicTime
Monotonically increasing time in seconds since an arbitrary point in the past.
T
Network.RequestId
Unique request identifier.
T
Network.ResourceType
Resource type as it was perceived by the rendering engine.
T
Network.TimeSinceEpoch
UTC time in seconds, counted from January 1, 1970.
T
NodeWorker.SessionID
Unique identifier of attached debugging session.
T
NodeWorker.WorkerID
No documentation available
T
Runtime.ExecutionContextId
Id of an execution context.
T
Runtime.RemoteObjectId
Unique object identifier.
T
Runtime.ScriptId
Unique script identifier.
T
Runtime.Timestamp
Number of milliseconds since epoch.
T
Runtime.UniqueDebuggerId
Unique identifier of current debugger.
T
Runtime.UnserializableValue
Primitive value which cannot be JSON-stringified.

Variables

v
console
An object to send messages to the remote inspector console.