We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a912425 commit b7608acCopy full SHA for b7608ac
deps/node-inspect/lib/_inspect.js
@@ -55,10 +55,11 @@ function getDefaultPort() {
55
56
function runScript(script, scriptArgs, inspectPort, childPrint) {
57
return new Promise((resolve) => {
58
- const args = [
59
- '--inspect',
60
- `--debug-brk=${inspectPort}`,
61
- ].concat([script], scriptArgs);
+ const needDebugBrk = process.version.match(/^v(6|7)\./);
+ const args = (needDebugBrk ?
+ ['--inspect', `--debug-brk=${inspectPort}`] :
+ [`--inspect-brk=${inspectPort}`])
62
+ .concat([script], scriptArgs);
63
const child = spawn(process.execPath, args);
64
child.stdout.setEncoding('utf8');
65
child.stderr.setEncoding('utf8');
0 commit comments