Skip to content

Commit

Permalink
Fix: Change DAP send/receive glyph to keep things aligned in the logs (
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinGrote authored Oct 31, 2024
1 parent 4e3db83 commit dbae6ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -643,15 +643,15 @@ class PowerShellDebugAdapterTrackerFactory implements DebugAdapterTrackerFactory
onWillStopSession: () => this.log?.info(`Stopping ${sessionInfo}`),
onExit: code => this.log?.info(`${sessionInfo} exited with code ${code}`),
onWillReceiveMessage: (m): void => {
this.log?.debug(`${m.seq} ${m.type}: ${m.command}`);
this.log?.debug(`${m.seq} ${m.type}: ${m.command}`);
if (m.arguments && (Array.isArray(m.arguments) ? m.arguments.length > 0 : Object.keys(m.arguments).length > 0)) {
this.log?.trace(`${m.seq}: ` + JSON.stringify(m.arguments, undefined, 2));
}
},
onDidSendMessage: (m):void => {
const responseSummary = m.request_seq !== undefined
? `${m.success ? "✅" : "❌"}${m.request_seq} ${m.type}(${m.seq}): ${m.command}`
: `${m.seq} ${m.type}: ${m.event ?? m.command}`;
: `${m.seq} ${m.type}: ${m.event ?? m.command}`;
this.log?.debug(
responseSummary
);
Expand Down

0 comments on commit dbae6ab

Please sign in to comment.