Skip to content

Commit b8639cb

Browse files
committed
debug progress: list on progress while launching as well
fixes microsoft#95541
1 parent bc2a20d commit b8639cb

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/vs/workbench/contrib/debug/browser/debugProgress.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ export class DebugProgressContribution implements IWorkbenchContribution {
1717
@IDebugService private readonly debugService: IDebugService,
1818
@IProgressService private readonly progressService: IProgressService
1919
) {
20-
let progressListener: IDisposable;
21-
const onFocusSession = (session: IDebugSession | undefined) => {
20+
let progressListener: IDisposable | undefined;
21+
const listenOnProgress = (session: IDebugSession | undefined) => {
2222
if (progressListener) {
2323
progressListener.dispose();
24+
progressListener = undefined;
2425
}
2526
if (session) {
2627
progressListener = session.onDidProgressStart(async progressStartEvent => {
@@ -71,8 +72,13 @@ export class DebugProgressContribution implements IWorkbenchContribution {
7172
});
7273
}
7374
};
74-
this.toDispose.push(this.debugService.getViewModel().onDidFocusSession(onFocusSession));
75-
onFocusSession(this.debugService.getViewModel().focusedSession);
75+
this.toDispose.push(this.debugService.getViewModel().onDidFocusSession(listenOnProgress));
76+
listenOnProgress(this.debugService.getViewModel().focusedSession);
77+
this.toDispose.push(this.debugService.onWillNewSession(session => {
78+
if (!progressListener) {
79+
listenOnProgress(session);
80+
}
81+
}));
7682
}
7783

7884
dispose(): void {

0 commit comments

Comments
 (0)