From dc8b08c05bcf54b5f89814b0193049ceb3785731 Mon Sep 17 00:00:00 2001 From: sophia <46455728+sophiali23@users.noreply.github.com> Date: Thu, 31 Aug 2023 09:53:26 -0400 Subject: [PATCH] debug: fix edit watch expressions when no debug session is present The commit fixes an issue where the edit watch expressions was not updated properly if there was no debug session present. Signed-off-by: Sophia Li --- packages/debug/src/browser/view/debug-watch-expression.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/debug/src/browser/view/debug-watch-expression.tsx b/packages/debug/src/browser/view/debug-watch-expression.tsx index 1d4bf58d5ac39..c3477ef5f7965 100644 --- a/packages/debug/src/browser/view/debug-watch-expression.tsx +++ b/packages/debug/src/browser/view/debug-watch-expression.tsx @@ -42,11 +42,10 @@ export class DebugWatchExpression extends ExpressionItem { } protected override setResult(body?: DebugProtocol.EvaluateResponse['body'], error?: string): void { - if (!this.options.session()) { - return; + if (this.options.session()) { + super.setResult(body, error); + this.isError = !!error; } - super.setResult(body, error); - this.isError = !!error; this.options.onDidChange(); }