File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/debug/browser Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments