-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UI for editing variables #7744
Comments
@weinand please notice that I started with just the context menu action with the 'Set Value' action. This action should only be enalbed for primitive values and only if the debug adapter supports set value. Try it out and let me know what you think. |
@isidorn works like a charm! One issue: on success use the body.value as the new value for the variable, not the value passed as an argument. |
@weinand great! Pushed the fix to respect the value returned. |
@isidorn Another issue: the error returned by |
@isidorn It looks like assigning to a variable doesn't prompt a reevaluation of any variables that depend on it. Variables can be stale after setting a variable in languages such as C# (e.g. a property in the locals window), and watch expressions can be stale in all languages since they can be arbitrary expressions dependent on the changed variable. |
@wesrupert true, can you please create a seperate issue for that. Thank you. |
I've added a new 'setVariableRequest' and a capability 'supportsSetVariable' to the debug protocol.
If this capability is true, the VS Code debugger should provide a UI gesture to edit the value of leafs in the variable view. The request takes the reference of the variable container, the name of the variable leaf, and the value as arguments. If the request succeeds, the new value is returned and is used as the new value of the variable. In case of failure the error should be shown in the error notification and the old value remains.
This is the UI for microsoft/vscode-debugadapter-node#27
The text was updated successfully, but these errors were encountered: