Exports
[<Class>]
type Exports =
static member Network: Network
static member NetworkResources: NetworkResources
static member console: InspectorConsole
static member Session () : Session
static member ``open`` (?port: float, ?host: string, ?wait: bool) : Disposable
static member close () : unit
static member url () : string option
static member waitForDebugger () : unit| Assembly | Xantham.Fable.Node |
| Attributes | [<Erase>] |
The package's value exports, each bound to its import.
Properties
static member NetworkResources: NetworkResourcesstatic member console: InspectorConsole
static member console: InspectorConsoleAn object to send messages to the remote inspector console.
@since v11.0.0
Methods
static member Session () : Session
static member Session () : SessionThe inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
@since v19.0.0
static member ``open`` (?port: float, ?host: string, ?wait: bool) : Disposable
static member ``open`` (?port: float, ?host: string, ?wait: bool) : 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.
| Parameter | |
|---|---|
port | Port to listen on for inspector connections. Defaults to what was specified on the CLI. |
host | Host to listen on for inspector connections. Defaults to what was specified on the CLI. |
wait | Block until a client has connected. Defaults to what was specified on the CLI. |
Returns. Disposable that calls inspector.close().
static member close () : unit
static member close () : unitDeactivate the inspector. Blocks until there are no active connections.
static member url () : string option
static member url () : string optionReturn 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