From ec9ba0edb68cdbd0d61ceb2e117e3b56eb7a67b4 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 18 Dec 2020 16:22:14 +0100 Subject: [PATCH] debug: Focus child session instead if it is stopped fixes #112595 --- src/vs/workbench/contrib/debug/browser/repl.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index 5f286e5fabf..6c179ed3f21 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -837,6 +837,13 @@ registerAction2(class extends ViewAction { const debugService = accessor.get(IDebugService); // If session is already the focused session we need to manualy update the tree since view model will not send a focused change event if (session && session.state !== State.Inactive && session !== debugService.getViewModel().focusedSession) { + if (session.state !== State.Stopped) { + // Focus child session instead if it is stopped #112595 + const stopppedChildSession = debugService.getModel().getSessions().find(s => s.parentSession === session); + if (stopppedChildSession) { + session = stopppedChildSession; + } + } await debugService.focusStackFrame(undefined, undefined, session, true); } else { await view.selectSession(session); -- GitLab