Skip to content
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

Debug protocol: setVariable identifies variables by display name #10219

Closed
vadimcn opened this issue Aug 5, 2016 · 1 comment
Closed

Debug protocol: setVariable identifies variables by display name #10219

vadimcn opened this issue Aug 5, 2016 · 1 comment
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality

Comments

@vadimcn
Copy link
Contributor

vadimcn commented Aug 5, 2016

  • VSCode Version: 1.4
  • OS Version: All

The new setVariable request identifies variables by display name.
This is fragile because the name may have been generated by the adapter (e.g. [N] for array indices).
There may also be more than one variable with the same name in the stack frame in languages that allow variable shadowing. For example, in C++ one can write

int a = 10; 
{ 
    int a = 20;
    ... // There are now two `a`'s here! 

The debugger can see both, even though in C++ there's no way to access the outer one.

To make this work robustly, I would suggest adding an optional "handle" field into Variable, which gets round-tripped back to the adapter in setVariable.

@vadimcn vadimcn changed the title [debug] [debug] setVariable identifies variables by display name Aug 5, 2016
@weinand weinand assigned weinand and unassigned isidorn Aug 9, 2016
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Aug 9, 2016
@weinand weinand changed the title [debug] setVariable identifies variables by display name setVariable identifies variables by display name Aug 9, 2016
@weinand weinand changed the title setVariable identifies variables by display name Debug protocol: setVariable identifies variables by display name Aug 9, 2016
@weinand weinand added the feature-request Request for new features or functionality label Aug 19, 2016
@weinand
Copy link
Contributor

weinand commented Aug 19, 2016

This issue was moved to Microsoft/vscode-debugadapter-node#54

@weinand weinand closed this as completed Aug 19, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants