提交 d2914f5b 编写于 作者: I isidor

Remove all old threads which are no longer part of the update

fixes #75980
上级 f1742df0
......@@ -577,7 +577,9 @@ export class DebugSession implements IDebugSession {
}
rawUpdate(data: IRawModelUpdate): void {
const threadIds: number[] = [];
data.threads.forEach(thread => {
threadIds.push(thread.id);
if (!this.threads.has(thread.id)) {
// A new thread came in, initialize it.
this.threads.set(thread.id, new Thread(this, thread.name, thread.id));
......@@ -589,6 +591,12 @@ export class DebugSession implements IDebugSession {
}
}
});
this.threads.forEach(t => {
// Remove all old threads which are no longer part of the update #75980
if (threadIds.indexOf(t.threadId) === -1) {
this.threads.delete(t.threadId);
}
});
const stoppedDetails = data.stoppedDetails;
if (stoppedDetails) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册