summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEugene Ostroukhov <eostroukhov@gmail.com>2019-07-26 10:40:54 -0700
committerEugene Ostroukhov <eostroukhov@gmail.com>2019-09-16 09:01:55 -0700
commit3d841fe20d732111094c3f62febd5a6b8b483b91 (patch)
tree197e5397ecd069b315f9e76b1d2ce942f35cfa9b /doc
parent70abb4ffe40c8526c5415c02c20b7b3a3cdbacd2 (diff)
downloadandroid-node-v8-3d841fe20d732111094c3f62febd5a6b8b483b91.tar.gz
android-node-v8-3d841fe20d732111094c3f62febd5a6b8b483b91.tar.bz2
android-node-v8-3d841fe20d732111094c3f62febd5a6b8b483b91.zip
inspector: new API - Session.connectToMainThread
This API is designed to enable worker threads use Inspector protocol on main thread (and other workers through NodeWorker domain). Note that worker can cause dead lock by suspending itself. I will work on a new API that will allow workers to be hidden from the inspector. Fixes: https://github.com/nodejs/node/issues/28828 PR-URL: https://github.com/nodejs/node/pull/28870 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/errors.md6
-rw-r--r--doc/api/inspector.md12
2 files changed, 15 insertions, 3 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md
index d01b763f89..baa75a21c8 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -1215,6 +1215,12 @@ The `inspector` module is not available for use.
While using the `inspector` module, an attempt was made to use the inspector
before it was connected.
+<a id="ERR_INSPECTOR_NOT_WORKER"></a>
+### ERR_INSPECTOR_NOT_WORKER
+
+An API was called on the main thread that can only be used from
+the worker thread.
+
<a id="ERR_INVALID_ADDRESS_FAMILY"></a>
### ERR_INVALID_ADDRESS_FAMILY
diff --git a/doc/api/inspector.md b/doc/api/inspector.md
index f82c53f5bc..96c3ad03c0 100644
--- a/doc/api/inspector.md
+++ b/doc/api/inspector.md
@@ -121,9 +121,15 @@ session.on('Debugger.paused', ({ params }) => {
added: v8.0.0
-->
-Connects a session to the inspector back-end. An exception will be thrown
-if there is already a connected session established either through the API or by
-a front-end connected to the Inspector WebSocket port.
+Connects a session to the inspector back-end.
+
+### session.connectToMainThread()
+<!-- YAML
+added: REPLACEME
+-->
+
+Connects a session to the main thread inspector back-end. An exception will
+be thrown if this API was not called on a Worker thread.
### session.disconnect()
<!-- YAML