Skip to content

Commit

Permalink
debugger: add usage example for --port
Browse files Browse the repository at this point in the history
PR-URL: #38400
Backport-PR-URL: #39446
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
RafaelGSS authored and richardlau committed Jul 22, 2021
1 parent ba96c56 commit 99a4c16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/internal/inspector/_inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ function startInspect(argv = process.argv.slice(2),

console.error(`Usage: ${invokedAs} script.js`);
console.error(` ${invokedAs} <host>:<port>`);
console.error(` ${invokedAs} --port=<port>`);
console.error(` ${invokedAs} -p <pid>`);
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-debug-usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ child.stderr.setEncoding('utf8');

const expectedLines = [
/^\(node:\d+\) \[DEP0068\] DeprecationWarning:/,
/Usage: .*node.* debug script\.js\r?\n .*node.* debug <host>:<port>\r?\n .*node.* debug -p <pid>\r?\n$/,
/Usage: .*node.* debug script\.js\r?\n .*node.* debug <host>:<port>\r?\n .*node.* debug --port=<port>\r?\n .*node.* debug -p <pid>\r?\n$/,
];

let actualUsageMessage = '';
Expand Down

0 comments on commit 99a4c16

Please sign in to comment.