microsoft / microsoft/debug-adapter-protocol
Debug protocol: `setVariable` identifies variables by display name
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 173
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 2
Description
From @vadimcn on August 5, 2016 19:43
- 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.
Copied from original issue: Microsoft/vscode#10219
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Variable definition and the setVariable request described in the issue. Define how an optional handle is carried through the protocol and returned to the adapter, then verify that generated display names and shadowed variables can be distinguished.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100