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.
c
Session
The `inspector.Session` is used for dispatching messages to the V8 inspector
back-end and receiving message responses and notifications.
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.
I
I
I
I
Debugger.CallFrame
JavaScript call frame. Array of call frames form the call stack.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Debugger.RestartFrameReturnType
No documentation available
I
I
I
I
I
I
I
I
I
I
I
Debugger.SetBreakpointByUrlParameterType
No documentation available
I
I
I
I
I
I
I
I
Debugger.SetScriptSourceReturnType
No documentation available
I
I
Debugger.SetVariableValueParameterType
No documentation available
I
I
I
I
I
I
I
I
I
I
I
I
I
HeapProfiler.SamplingHeapProfileNode
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
I
I
I
I
I
I
I
Network.Headers
Request / response headers as keys / values of JSON object.
I
I
I
I
I
I
I
I
I
I
I
I
NodeWorker.AttachedToWorkerEventDataType
No documentation available
I
I
I
I
I
I
I
I
I
I
I
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
I
I
I
I
I
Runtime.AwaitPromiseParameterType
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
I
I
Runtime.CompileScriptParameterType
No documentation available
I
I
Runtime.ConsoleAPICalledEventDataType
No documentation available
I
Runtime.CustomPreview
No documentation available
I
I
I
I
Runtime.ExceptionDetails
Detailed information about exception (or error) that was thrown during script compilation or execution.
I
I
I
I
I
I
Runtime.GetPropertiesParameterType
No documentation available
I
I
I
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.PropertyDescriptor
Object property descriptor.
I
I
I
I
I
I
Runtime.RemoteObject
Mirror object referencing original JavaScript object.
I
I
I
I
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
I
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
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.
v
console
An object to send messages to the remote inspector console.