mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-26 01:38:40 +01:00
Only automatically focus stack frame if no other stack frame is focused
fixes #16809
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user