diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 250d862a3719baa1bc5266bb0a22b025afef060b..d25b506caa796ae61e85c92e7e6f6be26f884805 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -236,7 +236,7 @@ export class DebugService implements debug.IDebugService { private tryToAutoFocusStackFrame(thread: debug.IThread): TPromise { const callStack = thread.getCallStack(); - if (!callStack.length || this.viewModel.focusedStackFrame) { + if (!callStack.length || (this.viewModel.focusedStackFrame && this.viewModel.focusedStackFrame.thread.threadId === thread.threadId)) { return TPromise.as(null); } @@ -529,7 +529,7 @@ export class DebugService implements debug.IDebugService { } if (!stackFrame) { const threads = process ? process.getAllThreads() : null; - const callStack = threads && threads.length ? threads[0].getCallStack() : null; + const callStack = threads && threads.length === 1 ? threads[0].getCallStack() : null; stackFrame = callStack && callStack.length ? callStack[0] : null; }