fixed 调试状态下,变量视图中,通过快捷键F2来设置值失败.

This commit is contained in:
chriswang521 2023-11-14 15:40:20 +08:00
parent 098a35884c
commit 8184d8bbcd
1 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ export class VariablesView extends ViewPane {
} }
})); }));
this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async e => { this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async e => {
if (e instanceof Variable) { if (e instanceof Variable && this.tree.hasNode(e)) {
await this.tree.updateChildren(e, false, true); await this.tree.updateChildren(e, false, true);
await this.tree.expand(e); await this.tree.expand(e);
} }
@ -470,7 +470,7 @@ class VariablesAccessibilityProvider implements IListAccessibilityProvider<IExpr
} }
} }
export const SET_VARIABLE_ID = 'debug.setVariable'; export const SET_VARIABLE_ID = 'debug.setVariable.context';
CommandsRegistry.registerCommand({ CommandsRegistry.registerCommand({
id: SET_VARIABLE_ID, id: SET_VARIABLE_ID,
handler: (accessor: ServicesAccessor) => { handler: (accessor: ServicesAccessor) => {