Skip to content

Commit

Permalink
Fixed double updates when inspecting variables that trigger invalidat…
Browse files Browse the repository at this point in the history
…ed events
  • Loading branch information
chrisdp committed Feb 10, 2025
1 parent 89cb33c commit 7abd616
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/debugSession/BrightScriptDebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 7abd616

Please sign in to comment.