diff --git a/packages/debug/src/browser/debug-session.tsx b/packages/debug/src/browser/debug-session.tsx index d04990c67bbce..30cb93d9f00d0 100644 --- a/packages/debug/src/browser/debug-session.tsx +++ b/packages/debug/src/browser/debug-session.tsx @@ -93,10 +93,7 @@ export class DebugSession implements CompositeTreeElement { } }), this.on('stopped', async ({ body }) => { - // Update thread list await this.updateThreads(body); - - // Update current thread's frames immediately await this.updateFrames(); }), this.on('thread', ({ body: { reason, threadId } }) => { @@ -224,9 +221,6 @@ export class DebugSession implements CompositeTreeElement { this.fireDidChange(); if (thread) { this.toDisposeOnCurrentThread.push(thread.onDidChanged(() => this.fireDidChange())); - - // If this thread is missing stack frame information, then load that. - this.updateFrames(); } } @@ -471,7 +465,7 @@ export class DebugSession implements CompositeTreeElement { protected async updateFrames(): Promise { const thread = this._currentThread; - if (!thread || thread.pendingFrameCount || thread.frameCount) { + if (!thread || thread.frameCount) { return; } if (this.capabilities.supportsDelayedStackTraceLoading) { diff --git a/packages/debug/src/browser/model/debug-thread.tsx b/packages/debug/src/browser/model/debug-thread.tsx index b9442b93128dd..c5225bc202230 100644 --- a/packages/debug/src/browser/model/debug-thread.tsx +++ b/packages/debug/src/browser/model/debug-thread.tsx @@ -140,9 +140,7 @@ export class DebugThread extends DebugThreadData implements TreeElement { } protected pendingFetch = Promise.resolve([]); - protected _pendingFetchCount: number = 0; async fetchFrames(levels: number = 20): Promise { - this._pendingFetchCount += 1; return this.pendingFetch = this.pendingFetch.then(async () => { try { const start = this.frameCount; @@ -151,14 +149,9 @@ export class DebugThread extends DebugThreadData implements TreeElement { } catch (e) { console.error(e); return []; - } finally { - this._pendingFetchCount -= 1; } }); } - get pendingFrameCount(): number { - return this._pendingFetchCount; - } protected async doFetchFrames(startFrame: number, levels: number): Promise { try { const response = await this.session.sendRequest('stackTrace',