microsoft / microsoft/debug-adapter-protocol
Allow enumeration of variables without fetching values
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 173
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 2
Description
We are currently investigating features for a debugger for embedded applications that would significantly benefit from mechanisms to enumerate global variables and file static variables of a C/C++ program. Maybe also functions in future.
A lot of what we'd need is already available with variables requests. But I can't find a way to explicitly configure to skip fetching the variable value. This would be important for our embedded use case. We often see applications with lots of global variables. But more importantly, even a moderate number of global variables can mean many target accesses which can be expensive and impact performance if you are using a JTAG debugger.
Would a new VariablesArguments property to skip reading values make sense? Or an entirely new API function for symbol/variable enumeration without fetching values?
Also, thinking about the huge number of global variables that can be returned, it could make sense to put them into a Scope that has a flag marking it as "do-not-show" in a variables window/GUI. Navigating the huge number of variables may not be practical. But you may still want to list them and their properties in other views and send them for example to a Watch window.
I was briefly thinking into the direction of using a language server for the enumeration. But in our experience, you better rely on the debugger/debug adapter to be the single source of truth of what really exists in the debug information/symbol tables of the debugged application.
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 with the existing variables requests and the proposed VariablesArguments property, then review how Scope is represented in the protocol. The issue does not name files or tests; done would require an agreed API for enumerating variables without fetching values, plus a decision on whether large scopes should be hidden from variable views.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100