Skip to content

Commit 51cb0d4

Browse files
kvakildanielleadams
authored andcommitted
doc: inspector.close undefined in worker threads
In the main thread, `inspector.close` is defined as `process._debugEnd`: ``` > inspector.close [Function: _debugEnd] ``` It's not defined in worker threads: ``` > const {Worker} = require("worker_threads"); > new Worker("console.log(require(\"inspector\").close)", {eval:true}) undefined ``` (As far as I can tell this is intentional and has existed for quite some time.) PR-URL: #43867 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Feng Yu <[email protected]>
1 parent c789c0f commit 51cb0d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/inspector.md

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const inspector = require('node:inspector');
1919

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

22+
This function is not available in [worker threads][].
23+
2224
## `inspector.console`
2325

2426
* {Object} An object to send messages to the remote inspector console.
@@ -260,3 +262,4 @@ session.post('HeapProfiler.takeHeapSnapshot', null, (err, r) => {
260262
[`'Debugger.paused'`]: https://chromedevtools.github.io/devtools-protocol/v8/Debugger#event-paused
261263
[`session.connect()`]: #sessionconnect
262264
[security warning]: cli.md#warning-binding-inspector-to-a-public-ipport-combination-is-insecure
265+
[worker threads]: worker_threads.md

0 commit comments

Comments
 (0)