Skip to content

Commit 782cea2

Browse files
committed
Show DAP pane when setting is enabled
1 parent 5ae9f6a commit 782cea2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/features/DebugSession.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,10 @@ class PowerShellDebugAdapterTrackerFactory implements DebugAdapterTrackerFactory
613613
change.affectsConfiguration("powershell.trace.dap")
614614
) {
615615
this.dapLogEnabled = workspace.getConfiguration("powershell").get<boolean>("trace.dap") ?? false
616+
if (this.dapLogEnabled) {
617+
// Trigger the output pane to appear. This gives the user time to position it before starting a debug.
618+
this.log?.show(true);
619+
}
616620
}
617621
}))
618622
}
@@ -635,7 +639,7 @@ class PowerShellDebugAdapterTrackerFactory implements DebugAdapterTrackerFactory
635639
async createDebugAdapterTracker(session: DebugSession): Promise<DebugAdapterTracker> {
636640
const sessionInfo = `${this.adapterName} Debug Session: ${session.name} [${session.id}]`
637641
return {
638-
onWillStartSession: () => this.dapLogEnabled && this.log?.info(`Starting ${sessionInfo}. Set log level to trace to see DAP messages beyond errors`),
642+
onWillStartSession: () => this.log?.info(`Starting ${sessionInfo}. Set log level to trace to see DAP messages beyond errors`),
639643
onWillStopSession: () => this.log?.info(`Stopping ${sessionInfo}`),
640644
onExit: code => this.log?.info(`${sessionInfo} exited with code ${code}`),
641645
onWillReceiveMessage: m => {

0 commit comments

Comments
 (0)