Add set value to live watch#977
Conversation
There was a problem hiding this comment.
Pull request overview
Adds “Set Value” support to the Live Watch view so users can modify watched variables directly from the Live Watch context menu, addressing feature request #653.
Changes:
- Registered a new
vscode-cmsis-debugger.liveWatch.setValuecommand and implemented handling to issue DAPsetExpression/setVariablerequests. - Added unit tests covering root vs child node set-value behavior.
- Exposed the command via extension contributions (command + Live Watch context menu entry).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/views/live-watch/live-watch.ts |
Registers the new command and implements the set-value request logic. |
src/views/live-watch/live-watch.test.ts |
Adds tests for set-value behavior and updates command registration expectations. |
package.json |
Contributes the new command and wires it into the Live Watch view context menu. |
__mocks__/vscode.js |
Extends VS Code mock with window.showInputBox to support new tests. |
|
Coverage Impact ⬇️ Merging this pull request will decrease total coverage on Modified Files with Diff Coverage (1)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
jreineckearm
left a comment
There was a problem hiding this comment.
Apologies for raising only now, didn't submit the review yet.
Changes look good and work for me as expected for expression children.
However, changes to parent expressions are silently ignored at the moment. Which makes sense because the support is not yet released in the GDB Adapter. We should enable Set Value only when we detect supportsSetExpression on the adapter capabilities.
Capabilities are already stored here:
.Also, if we can't make it work while running, then we should disable/block this functionality while running

Fixes
Changes
Screenshots
Checklist