Only automatically focus stack frame if no other stack frame is focused

fixes #16809
This commit is contained in:
isidor
2016-12-23 14:46:49 +01:00
parent 9ebf0dfb80
commit e2ba0e22bc
@@ -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();