Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Commit 2b93173

Browse files
author
Jan Krems
committed
fix: Use single string for paused notice
1 parent 802b88c commit 2b93173

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/internal/inspect_repl.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,16 +770,19 @@ function createRepl(inspector) {
770770
const breakType = reason === 'other' ? 'break' : reason;
771771
const script = knownScripts[scriptId];
772772
const scriptUrl = script ? getRelativePath(script.url) : '[unknown]';
773-
print(`${breakType} in ${scriptUrl}:${lineNumber + 1}`);
773+
774+
const header = `${breakType} in ${scriptUrl}:${lineNumber + 1}`;
774775

775776
inspector.suspendReplWhile(() =>
776777
Promise.all([formatWatchers(true), selectedFrame.list(2)])
777778
.then(([watcherList, context]) => {
778779
if (watcherList) {
779780
return `${watcherList}\n${inspect(context)}`;
780781
}
781-
return context;
782-
}).then(print));
782+
return inspect(context);
783+
}).then((breakContext) => {
784+
print(`${header}\n${breakContext}`);
785+
}));
783786
});
784787

785788
function handleResumed() {

0 commit comments

Comments
 (0)