summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2017-02-14 13:24:37 -0800
committerJames M Snell <jasnell@gmail.com>2017-02-19 12:55:36 -0800
commit389b9e484d1c80e91fdffdc13eb624db49c0ce5d (patch)
tree3b287ace6a194adcfbbce180c85b43c96793f483
parentc090ca816046241658a576d97e28d529a5daf493 (diff)
downloadnode-new-389b9e484d1c80e91fdffdc13eb624db49c0ce5d.tar.gz
cluster: properly handle --inspect-{brk,port}
PR-URL: https://github.com/nodejs/node/pull/11386 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r--lib/internal/cluster/master.js2
-rw-r--r--test/parallel/test-cluster-inspector-debug-port.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js
index 9d5062f542..97a7138174 100644
--- a/lib/internal/cluster/master.js
+++ b/lib/internal/cluster/master.js
@@ -115,7 +115,7 @@ function createWorkerProcess(id, env) {
for (var i = 0; i < execArgv.length; i++) {
const match = execArgv[i].match(
- /^(--inspect|--debug|--debug-(brk|port))(=\d+)?$/
+ /^(--inspect|--inspect-(brk|port)|--debug|--debug-(brk|port))(=\d+)?$/
);
if (match) {
diff --git a/test/parallel/test-cluster-inspector-debug-port.js b/test/parallel/test-cluster-inspector-debug-port.js
index 0adb6d2a2b..f2f8db9b5d 100644
--- a/test/parallel/test-cluster-inspector-debug-port.js
+++ b/test/parallel/test-cluster-inspector-debug-port.js
@@ -27,6 +27,8 @@ if (cluster.isMaster) {
fork(4, ['--inspect', '--debug']);
fork(5, [`--debug=${debuggerPort}`, '--inspect']);
fork(6, ['--inspect', `--debug-port=${debuggerPort}`]);
+ fork(7, [`--inspect-port=${debuggerPort}`]);
+ fork(8, ['--inspect', `--inspect-port=${debuggerPort}`]);
} else {
const hasDebugArg = process.execArgv.some(function(arg) {
return /inspect/.test(arg);