summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-10-21 13:52:04 +0200
committerRod Vagg <rod@vagg.org>2016-06-02 22:40:45 +1000
commit2184e772d272dba5621014bda9f00d4c974430ce (patch)
tree6d9aaf3d37e8039159524f5ea19e5b14699485ed /lib
parentbf3afce6686c50230c0f299346783a86ef655ab7 (diff)
downloadnode-new-2184e772d272dba5621014bda9f00d4c974430ce.tar.gz
debugger: propagate --debug-port= to debuggee
Before this commit `node --debug-port=1234 debug t.js` ignored the --debug-port= argument, binding to the default port 5858 instead, making it impossible to debug more than one process on the same machine that way. This commit also reduces the number of places where the default port is hard-coded by one. Fixes: https://github.com/nodejs/node/issues/3345 PR-URL: https://github.com/nodejs/node/pull/3470 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/_debugger.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/_debugger.js b/lib/_debugger.js
index e872d77ea5..7da2f70bca 100644
--- a/lib/_debugger.js
+++ b/lib/_debugger.js
@@ -26,7 +26,7 @@ exports.start = function(argv, stdin, stdout) {
stdin = stdin || process.stdin;
stdout = stdout || process.stdout;
- const args = ['--debug-brk'].concat(argv);
+ const args = [`--debug-brk=${exports.port}`].concat(argv);
const interface_ = new Interface(stdin, stdout, args);
stdin.resume();
@@ -41,7 +41,7 @@ exports.start = function(argv, stdin, stdout) {
});
};
-exports.port = 5858;
+exports.port = process.debugPort;
//