diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-10-10 15:01:49 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-06-30 13:41:51 +0200 |
commit | c5c28c3d50fa6bcde1329b855ca79d5b7c87c0d4 (patch) | |
tree | d36f6e4d411c1a576da1dd2effa499b0033667f8 /src/debug-agent.h | |
parent | 7dcc4af8277744eb275a5f5cf43316688460f5e7 (diff) | |
download | android-node-v8-c5c28c3d50fa6bcde1329b855ca79d5b7c87c0d4.tar.gz android-node-v8-c5c28c3d50fa6bcde1329b855ca79d5b7c87c0d4.tar.bz2 android-node-v8-c5c28c3d50fa6bcde1329b855ca79d5b7c87c0d4.zip |
debugger: make listen address configurable
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch. The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.
`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.
Fixes: https://github.com/nodejs/node/issues/3306
PR-URL: https://github.com/nodejs/node/pull/3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/debug-agent.h')
-rw-r--r-- | src/debug-agent.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/debug-agent.h b/src/debug-agent.h index 45aa07bf24..504212653b 100644 --- a/src/debug-agent.h +++ b/src/debug-agent.h @@ -32,6 +32,7 @@ #include "v8-debug.h" #include <string.h> +#include <string> // Forward declaration to break recursive dependency chain with src/env.h. namespace node { @@ -75,7 +76,7 @@ class Agent { typedef void (*DispatchHandler)(node::Environment* env); // Start the debugger agent thread - bool Start(int port, bool wait); + bool Start(const std::string& host, int port, bool wait); // Listen for debug events void Enable(); // Stop the debugger agent @@ -114,6 +115,7 @@ class Agent { State state_; + std::string host_; int port_; bool wait_; |