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

Commit

Permalink
fix: Use single string for paused notice
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Krems committed Mar 14, 2017
1 parent 802b88c commit 2b93173
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/internal/inspect_repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,16 +770,19 @@ function createRepl(inspector) {
const breakType = reason === 'other' ? 'break' : reason;
const script = knownScripts[scriptId];
const scriptUrl = script ? getRelativePath(script.url) : '[unknown]';
print(`${breakType} in ${scriptUrl}:${lineNumber + 1}`);

const header = `${breakType} in ${scriptUrl}:${lineNumber + 1}`;

inspector.suspendReplWhile(() =>
Promise.all([formatWatchers(true), selectedFrame.list(2)])
.then(([watcherList, context]) => {
if (watcherList) {
return `${watcherList}\n${inspect(context)}`;
}
return context;
}).then(print));
return inspect(context);
}).then((breakContext) => {
print(`${header}\n${breakContext}`);
}));
});

function handleResumed() {
Expand Down

0 comments on commit 2b93173

Please sign in to comment.