summaryrefslogtreecommitdiff
path: root/doc/api/inspector.md
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2018-07-04 19:55:12 +0200
committerMatteo Collina <hello@matteocollina.com>2018-07-07 00:04:52 +0200
commit19795d83833de7489afec583f8773ee9c0452f70 (patch)
tree0e495abfe821e92a158b757fcb0a24715fc7d863 /doc/api/inspector.md
parentdd023df135207086c86129aa1683ea4688f97f53 (diff)
downloadandroid-node-v8-19795d83833de7489afec583f8773ee9c0452f70.tar.gz
android-node-v8-19795d83833de7489afec583f8773ee9c0452f70.tar.bz2
android-node-v8-19795d83833de7489afec583f8773ee9c0452f70.zip
inspector: expose original console
Adds require('inspector').console, mapping it to the original global.console of V8. This enables applications to send messages to the inspector console programmatically. Fixes: https://github.com/nodejs/node/issues/21651 PR-URL: https://github.com/nodejs/node/pull/21659 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/inspector.md')
-rw-r--r--doc/api/inspector.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/api/inspector.md b/doc/api/inspector.md
index 7b1adcc47b..8ab827bd1f 100644
--- a/doc/api/inspector.md
+++ b/doc/api/inspector.md
@@ -28,6 +28,17 @@ 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.
+### inspector.console
+
+An object to send messages to the remote inspector console.
+
+```js
+require('inspector').console.log('a message');
+```
+
+The inspector console does not have API parity with Node.js
+console.
+
### inspector.close()
Deactivate the inspector. Blocks until there are no active connections.