Skip to content

Commit 7d355cb

Browse files
committed
Fix trace for request arguments
1 parent 6669264 commit 7d355cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/features/DebugSession.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -644,19 +644,19 @@ class PowerShellDebugAdapterTrackerFactory implements DebugAdapterTrackerFactory
644644
onExit: code => this.log?.info(`${sessionInfo} exited with code ${code}`),
645645
onWillReceiveMessage: (m): void => {
646646
this.log?.debug(`▶️${m.seq} ${m.type}: ${m.command}`);
647-
if (m.body && (Array.isArray(m.body) ? m.body.length > 0 : Object.keys(m.body).length > 0)) {
648-
this.log?.trace(JSON.stringify(m.body, undefined, 2));
647+
if (m.arguments && (Array.isArray(m.arguments) ? m.arguments.length > 0 : Object.keys(m.arguments).length > 0)) {
648+
this.log?.trace(`${m.seq}: ` + JSON.stringify(m.arguments, undefined, 2));
649649
}
650650
},
651651
onDidSendMessage: (m):void => {
652652
const responseSummary = m.request_seq !== undefined
653653
? `${m.success ? "✅" : "❌"}${m.request_seq} ${m.type}(${m.seq}): ${m.command}`
654-
: `◀️${m.seq} ${m.type}: ${m.command}`;
654+
: `◀️${m.seq} ${m.type}: ${m.event ?? m.command}`;
655655
this.log?.debug(
656656
responseSummary
657657
);
658658
if (m.body && (Array.isArray(m.body) ? m.body.length > 0 : Object.keys(m.body).length > 0)) {
659-
this.log?.trace(JSON.stringify(m.body, undefined, 2));
659+
this.log?.trace(`${m.seq}: ` + JSON.stringify(m.body, undefined, 2));
660660
}
661661
},
662662
onError: e => this.log?.error(e),

0 commit comments

Comments
 (0)