Skip to content

Commit fd2f43e

Browse files
committed
1 parent 00c352d commit fd2f43e

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class CallStackView extends ViewletPanel {
4646
private dataSource: CallStackDataSource;
4747
private tree: WorkbenchAsyncDataTree<CallStackItem | IDebugModel, CallStackItem, FuzzyScore>;
4848
private contributedContextMenu: IMenu;
49+
private parentSessionToExpand = new Set<IDebugSession>();
4950

5051
constructor(
5152
private options: IViewletViewOptions,
@@ -81,7 +82,11 @@ export class CallStackView extends ViewletPanel {
8182

8283
this.needsRefresh = false;
8384
this.dataSource.deemphasizedStackFramesToShow = [];
84-
this.tree.updateChildren().then(() => this.updateTreeSelection());
85+
this.tree.updateChildren().then(() => {
86+
this.parentSessionToExpand.forEach(s => this.tree.expand(s));
87+
this.parentSessionToExpand.clear();
88+
this.updateTreeSelection();
89+
});
8590
}, 50);
8691
}
8792

@@ -218,6 +223,13 @@ export class CallStackView extends ViewletPanel {
218223
this.onCallStackChangeScheduler.schedule();
219224
}
220225
}));
226+
227+
this.disposables.push(this.debugService.onDidNewSession(s => {
228+
if (s.parentSession) {
229+
// Auto expand sessions that have sub sessions
230+
this.parentSessionToExpand.add(s.parentSession);
231+
}
232+
}));
221233
}
222234

223235
layoutBody(height: number, width: number): void {

0 commit comments

Comments
 (0)