Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugger: cherry-pick remaining commits for node-inspect #38400

Merged
merged 3 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions lib/internal/inspector/inspect_repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ function createRepl(inspector) {
const lines = watchedExpressions
.map((expr, idx) => {
const prefix = `${leftPad(idx, ' ', lastIndex)}: ${expr} =`;
const value = inspect(values[idx], { colors: true });
const value = inspect(values[idx]);
if (value.indexOf('\n') === -1) {
return `${prefix} ${value}`;
}
Expand Down Expand Up @@ -1027,7 +1027,7 @@ function createRepl(inspector) {

repl.setPrompt('> ');

print('Press Ctrl + C to leave debug repl');
print('Press Ctrl+C to leave debug repl');
repl.displayPrompt();
},

Expand Down Expand Up @@ -1096,7 +1096,7 @@ function createRepl(inspector) {
repl.on('reset', initializeContext);

repl.defineCommand('interrupt', () => {
// We want this for testing purposes where sending CTRL-C can be tricky.
// We want this for testing purposes where sending Ctrl+C can be tricky.
repl.emit('SIGINT');
});

Expand Down
2 changes: 1 addition & 1 deletion test/inspector-cli/test-inspector-cli-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const assert = require('assert');
.then(() => {
assert.match(
cli.output,
/Press Ctrl \+ C to leave debug repl\n+> /,
/Press Ctrl\+C to leave debug repl\n+> /,
'shows hint for how to leave repl');
assert.doesNotMatch(cli.output, /debug>/, 'changes the repl style');
})
Expand Down