diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2017-05-25 19:00:24 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2017-06-06 14:41:17 -0700 |
commit | 2791b360c11324f7c9ed83350f264c500ade4fe8 (patch) | |
tree | 32c398bc37f0d864d294cc629167aa577c30f08c /lib/inspector.js | |
parent | dcfbbacba8c22613b956c1a3b9d958676e5d5e87 (diff) | |
download | android-node-v8-2791b360c11324f7c9ed83350f264c500ade4fe8.tar.gz android-node-v8-2791b360c11324f7c9ed83350f264c500ade4fe8.tar.bz2 android-node-v8-2791b360c11324f7c9ed83350f264c500ade4fe8.zip |
inspector: allow --inspect=host:port from js
PR-URL: https://github.com/nodejs/node/pull/13228
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/inspector.js')
-rw-r--r-- | lib/inspector.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/inspector.js b/lib/inspector.js index 1edc9fc3be..e4c401a995 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -1,8 +1,8 @@ 'use strict'; -const connect = process.binding('inspector').connect; const EventEmitter = require('events'); const util = require('util'); +const { connect, open, url } = process.binding('inspector'); if (!connect) throw new Error('Inspector is not available'); @@ -83,5 +83,8 @@ class Session extends EventEmitter { } module.exports = { + open: (port, host, wait) => open(port, host, !!wait), + close: process._debugEnd, + url: url, Session }; |