提交 cd79dfce 编写于 作者: I isidor

evalute watch expresisons once variables value is set

fixes #8118
上级 38748b44
......@@ -575,6 +575,11 @@ export interface IDebugService {
*/
removeWatchExpressions(id?: string): void;
/**
* Evaluates all watch expression.
*/
evaluateWatchExpressions(): TPromise<void>;
/**
* Starts debugging. If the configOrName is not passed uses the selected configuration in the debug dropdown.
* Also saves all files, manages if compounds are present in the configuration
......
......@@ -604,6 +604,10 @@ export class DebugService implements debug.IDebugService {
this.model.removeWatchExpressions(id);
}
public evaluateWatchExpressions(): TPromise<void> {
return this.model.evaluateWatchExpressions(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame);
}
public startDebugging(root: uri, configOrName?: debug.IConfig | string, noDebug = false, topCompoundName?: string): TPromise<any> {
// make sure to save all files and that the configuration is up to date
......
......@@ -152,7 +152,10 @@ function renderRenameBox(debugService: debug.IDebugService, contextViewService:
if (renamed && element.value !== inputBox.value) {
element.setVariable(inputBox.value)
// if everything went fine we need to refresh ui elements since the variable update can change watch and variables view
.done(() => tree.refresh(element, false), errors.onUnexpectedError);
.done(() => {
tree.refresh(element, false);
debugService.evaluateWatchExpressions();
}, errors.onUnexpectedError);
}
}
......
......@@ -83,6 +83,10 @@ export class MockDebugService implements debug.IDebugService {
public removeWatchExpressions(id?: string): void { }
public evaluateWatchExpressions(): TPromise<void> {
return TPromise.as(null);
}
public startDebugging(root: uri, configOrName?: debug.IConfig | string, noDebug?: boolean): TPromise<any> {
return TPromise.as(null);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册