Skip to content

Commit a407d77

Browse files
committed
Fix debugger client's logging message trimming
1 parent f4b6baa commit a407d77

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

vscode/src/debugger.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,12 @@ export class Debugger
347347
}
348348

349349
private logDebuggerMessage(message: string) {
350-
const trimmedMessage = message.trimEnd();
351-
if (trimmedMessage.length > 0) {
352-
LOG_CHANNEL.info(`[debugger]: ${trimmedMessage}`);
353-
this.console.append(trimmedMessage);
354-
}
350+
// In the Output panel, each log automatically gets a new line
351+
// And trailing newlines will create one additional line in the panel, so we trimEnd() here to avoid that
352+
LOG_CHANNEL.info(`[debugger]: ${message.trimEnd()}`);
353+
354+
// In the Debug Console, output doesn't get a new line automatically, so we don't trimEnd() here as well as print
355+
// the newlines too
356+
this.console.append(message);
355357
}
356358
}

0 commit comments

Comments
 (0)