From 7abd616a6c585f61baa9fdae36961625eee9f1ec Mon Sep 17 00:00:00 2001 From: Christopher Dwyer-Perkins Date: Mon, 10 Feb 2025 11:09:45 -0400 Subject: [PATCH] Fixed double updates when inspecting variables that trigger invalidated events --- src/debugSession/BrightScriptDebugSession.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/debugSession/BrightScriptDebugSession.ts b/src/debugSession/BrightScriptDebugSession.ts index cc2fc009..2d74836d 100644 --- a/src/debugSession/BrightScriptDebugSession.ts +++ b/src/debugSession/BrightScriptDebugSession.ts @@ -1438,8 +1438,10 @@ export class BrightScriptDebugSession extends BaseDebugSession { } } + // Only send the updated variables if we are not going to trigger an invalidated event. + // This is to prevent the UI from updating twice and makes the experience much smoother to the end user. response.body = { - variables: this.filterVariablesUpdates(updatedVariables, args, this.variables[args.variablesReference]) + variables: sendInvalidatedEvent ? [] : this.filterVariablesUpdates(updatedVariables, args, this.variables[args.variablesReference]) }; } catch (error) { logger.error('Error during variablesRequest', error, { args });