Skip to content

Commit 669c21b

Browse files
committed
clear tree on state change
1 parent 9ce89eb commit 669c21b

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Search for values through the Visual Studio Code debugger.
66

77
![](resources/debuggerSearch.gif "Debugger Search Demonstration")
88

9-
This extension adds eight new commands to Visual Studio Code:
9+
This extension adds nine new commands to Visual Studio Code:
1010

1111
- **variableSearch.search** - Search for a term while the debugger is paused. Filters by thread, stack frame and scope. Prints results to a special output channel,
1212
and to a custom view under "Run and Debug."

src/VariableSearchDebugAdapterTracker.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ export default class VariableSearchDebugAdapterTracker implements DebugAdapterTr
9898
if (VariableSearchDebugAdapterTracker.trackerReference !== undefined && reference?.searchInProgress) {
9999
reference?.cancelSearch();
100100
}
101+
vscode.commands.executeCommand("variableSearch.refreshSearchTree", []).then(
102+
(success) => {
103+
},
104+
(failure) => {
105+
if (Constants.debuggerSearchLoggingEnabled) {
106+
console.log(failure);
107+
}
108+
}
109+
);
101110
}
102111

103112
private debuggerContinuedOrExited(): void {
@@ -108,6 +117,16 @@ export default class VariableSearchDebugAdapterTracker implements DebugAdapterTr
108117
VariableSearchDebugAdapterTracker.debuggerPaused = false;
109118
VariableSearchDebugAdapterTracker.resetParameters();
110119
VariableSearchDebugAdapterTracker._selectedThreads = undefined;
120+
121+
vscode.commands.executeCommand("variableSearch.refreshSearchTree", []).then(
122+
(success) => {
123+
},
124+
(failure) => {
125+
if (Constants.debuggerSearchLoggingEnabled) {
126+
console.log(failure);
127+
}
128+
}
129+
);
111130
}
112131

113132

0 commit comments

Comments
 (0)