Skip to content

Commit 5a6113b

Browse files
committed
debug: expand focussedThread
1 parent 9ff8dda commit 5a6113b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/vs/workbench/parts/debug/browser/debugViewlet.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,13 @@ class CallStackView extends viewlet.CollapsibleViewletView {
282282

283283
this.toDispose.push(this.debugService.getViewModel().addListener2(debug.ViewModelEvents.FOCUSED_STACK_FRAME_UPDATED, () => {
284284
const focussedThread = this.debugService.getModel().getThreads()[this.debugService.getViewModel().getFocusedThreadId()];
285-
if (focussedThread && focussedThread.stoppedDetails && focussedThread.stoppedDetails.reason) {
285+
if (!focussedThread) {
286+
return;
287+
}
288+
289+
this.tree.expand(focussedThread);
290+
this.tree.select(this.debugService.getViewModel().getFocusedStackFrame());
291+
if (focussedThread.stoppedDetails && focussedThread.stoppedDetails.reason) {
286292
this.pauseMessageLabel.text(nls.localize('debugStopped', "Paused on {0}", focussedThread.stoppedDetails.reason));
287293
if (focussedThread.stoppedDetails.text) {
288294
this.pauseMessageLabel.title(focussedThread.stoppedDetails.text);

0 commit comments

Comments
 (0)