Highlight changing expressions in Live Watch#991
Conversation
|
@JonatanAntoni @thorstendb-ARM I acknowledge that there might be some opinions on which parts of the expression should get highlighted. We can discuss it together in a meeting, but these are just some details that can easily be changed |
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (1)
🛟 Help
|
There was a problem hiding this comment.
Pull request overview
Adds change-highlighting behavior to the Live Watch tree so users can more easily spot updated values during debugging (fixes #850).
Changes:
- Introduces a
highlightedLabelon Live Watch values and uses it to render highlighted tree item labels. - Splits evaluation into initial evaluation vs per-node refresh evaluation to detect value changes.
- Updates and extends Jest tests to cover highlight vs non-highlight behavior on refresh.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/views/live-watch/live-watch.ts |
Adds highlightedLabel support and refresh-time change detection to apply label highlighting. |
src/views/live-watch/live-watch.test.ts |
Updates mocks for renamed evaluation methods and adds tests for highlight behavior. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
84a56f4 to
9aa36f2
Compare
There was a problem hiding this comment.
Gave it a test: Logic for a single update trigger looks good.
Will certainly provoke comments because of the name/expression, not the value ("description") getting highlighted. But the alternative of putting expression and value on the label isn't great either. Might work better for variables, but misleading for watch expressions which themselves can include = characters.
I see however troubles with the highlight getting immediately removed by multiple refresh requests coming in for the same expression after stopping the CPU. Can you confirm this?
Probably needs some debouncing logic....
|
Retested with a VSIX build from CI. Situation regarding unexpected highlight behavior improves a little. |
|
I added a coalescing mechanism to help with the flickering behaviour, please let me know if there are anymore bugs you have found |

Fixes
Changes
Screenshots
Checklist