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);