fixes #125144
This commit is contained in:
parent
a6574c8002
commit
5278e78731
1 changed files with 9 additions and 3 deletions
|
@ -908,13 +908,19 @@ export class DebugSession implements IDebugSession {
|
|||
this.model.clearThreads(this.getId(), false, threadId);
|
||||
this._onDidChangeState.fire();
|
||||
// If the focused thread does get stopped in the next 800ms auto focus another thread or session https://github.com/microsoft/vscode/issues/125144
|
||||
setTimeout(() => {
|
||||
if (typeof threadId === 'number' && this.debugService.getViewModel().focusedThread?.threadId === threadId && this.debugService.state !== State.Stopped) {
|
||||
if (typeof threadId === 'number') {
|
||||
const thread = this.debugService.getViewModel().focusedThread;
|
||||
if (thread && thread.threadId === threadId && !thread.stopped) {
|
||||
const toFocusThreadId = this.getStoppedDetails()?.threadId;
|
||||
const toFocusThread = typeof toFocusThreadId === 'number' ? this.getThread(toFocusThreadId) : undefined;
|
||||
this.debugService.focusStackFrame(undefined, toFocusThread);
|
||||
}
|
||||
}, 800);
|
||||
} else {
|
||||
const session = this.debugService.getViewModel().focusedSession;
|
||||
if (session && session.getId() === this.getId() && session.state !== State.Stopped) {
|
||||
this.debugService.focusStackFrame(undefined);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
const outputQueue = new Queue<void>();
|
||||
|
|
Loading…
Reference in a new issue