提交 963783b8 编写于 作者: I isidor

debug: only one evaluate on new watch expression

fixes #21524
上级 96bbe810
......@@ -927,7 +927,8 @@ export class Model implements debug.IModel {
const filtered = this.watchExpressions.filter(we => we.getId() === id);
if (filtered.length === 1) {
filtered[0].name = newName;
return filtered[0].evaluate(process, stackFrame, 'watch').then(() => {
// Evaluate all watch expressions again since the new watch expression might have changed some.
return this.evaluateWatchExpressions(process, stackFrame).then(() => {
this._onDidChangeWatchExpressions.fire(filtered[0]);
});
}
......
......@@ -548,9 +548,7 @@ export class DebugService implements debug.IDebugService {
}
public renameWatchExpression(id: string, newName: string): TPromise<void> {
return this.model.renameWatchExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, id, newName)
// Evaluate all watch expressions and fetch variables again since watch expression evaluation might have changed some.
.then(() => this.focusStackFrameAndEvaluate(this.viewModel.focusedStackFrame, this.viewModel.focusedProcess));
return this.model.renameWatchExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, id, newName);
}
public moveWatchExpression(id: string, position: number): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册