From e2ba0e22bcddbf60638d0f29f2afa942dd1061ff Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 23 Dec 2016 14:46:15 +0100 Subject: [PATCH] Only automatically focus stack frame if no other stack frame is focused fixes #16809 --- src/vs/workbench/parts/debug/electron-browser/debugService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index fc27e3538ef..d37c97454f4 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -276,8 +276,8 @@ export class DebugService implements debug.IDebugService { const thread = process && process.getThread(threadId); if (thread) { thread.fetchCallStack().then(callStack => { - if (callStack.length > 0) { - // focus first stack frame from top that has source location + if (callStack.length > 0 && !this.viewModel.focusedStackFrame) { + // focus first stack frame from top that has source location if no other stack frame is focussed const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); this.windowService.getWindow().focus();