Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisidor <inikolic@microsoft.com>2017-05-12 16:25:08 +0300
committerisidor <inikolic@microsoft.com>2017-05-12 16:25:15 +0300
commit85df4550bec9667cd36c39051b42592da2e683ab (patch)
tree0682c1e371e0e8d520c94e254258bc03b32992f2 /src/vs/workbench/parts/debug
parentb4a7da9219c0d08f3d9b851e54357844a01e85d2 (diff)
debug: reduce callstack flashing by showing a stale remainder of the callstack
#25605
Diffstat (limited to 'src/vs/workbench/parts/debug')
-rw-r--r--src/vs/workbench/parts/debug/common/debugModel.ts9
-rw-r--r--src/vs/workbench/parts/debug/electron-browser/debugViewer.ts5
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]);