diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vs/workbench/parts/debug/common/debugModel.ts | 9 | ||||
-rw-r--r-- | src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 2ec0be9c6af..1f3e082dc63 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -373,6 +373,7 @@ export class StackFrame implements IStackFrame { export class Thread implements IThread { private fetchPromise: TPromise<void>; private callStack: IStackFrame[]; + private staleCallStack: IStackFrame[]; public stoppedDetails: IRawStoppedDetails; public stopped: boolean; @@ -380,6 +381,7 @@ export class Thread implements IThread { this.fetchPromise = null; this.stoppedDetails = null; this.callStack = []; + this.staleCallStack = []; this.stopped = false; } @@ -389,6 +391,9 @@ export class Thread implements IThread { public clearCallStack(): void { this.fetchPromise = null; + if (this.callStack.length) { + this.staleCallStack = this.callStack; + } this.callStack = []; } @@ -396,6 +401,10 @@ export class Thread implements IThread { return this.callStack; } + public getStaleCallStack(): IStackFrame[] { + return this.staleCallStack; + } + /** * Queries the debug adapter for the callstack and returns a promise * which completes once the call stack has been retrieved. diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 5450d5d5099..2c8391b709f 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -366,6 +366,11 @@ export class CallStackDataSource implements IDataSource { if (!callStack) { return []; } + if (callStack.length === 1) { + // To reduce flashing of the call stack view simply append the stale call stack + // once we have the correct data the tree will refresh and we will no longer display it. + return callStack.concat(thread.getStaleCallStack().slice(1)); + } if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { return callStack.concat([thread.stoppedDetails.framesErrorMessage]); |