diff options
author | Matteo Collina <hello@matteocollina.com> | 2018-07-04 19:55:12 +0200 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2018-07-07 00:04:52 +0200 |
commit | 19795d83833de7489afec583f8773ee9c0452f70 (patch) | |
tree | 0e495abfe821e92a158b757fcb0a24715fc7d863 /doc | |
parent | dd023df135207086c86129aa1683ea4688f97f53 (diff) | |
download | android-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')
-rw-r--r-- | doc/api/inspector.md | 11 |
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. |