diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index 5f286e5fabf8aa23dcde90e5b17634053fcf628c..6c179ed3f21fbfdc9f5ccc319857b3e58a605545 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);