From 539c7c395ea34c5e795583578775a81282d1d7ce Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 14 Feb 2017 13:24:37 -0800 Subject: [PATCH] cluster: properly handle --inspect-{brk,port} --- lib/internal/cluster/master.js | 2 +- test/parallel/test-cluster-inspector-debug-port.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 9d5062f5427ffa..97a71381744573 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 0adb6d2a2b37b8..f2f8db9b5d5890 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);