microsoft / microsoft/vscode-cpptools
[Feature Request] [gdb] Support Variable Paging
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version: Windows 10 & macOS
- VS Code Version: 1.28.2
- C/C++ Extension Version: 0.19.0
The debugging experience with gdb becomes unusable when there is a large number of local variables, e.g. 100-200, half of them arrays. With "engineLogging": true and gdb pretty-printing disabled, I can see in the debug console that when a breakpoint is hit or when I forward one step the C++ extension is querying gdb sequentially for information about each local variable, each request taking around half a second. This means that each step to the next line takes around half a minute in my case for this code base.
When stepping through code it is often not needed to know information about all variables, but instead just the ones that are in the watch window. If only those were fetched and the rest lazily in the background or on demand, then stepping would be fast even with large numbers of local variables. Maybe there is another way to improve performance, but this is what came to my mind from an outside perspective.
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 C/C++ extension's debugger handling and reproduce the slowdown with engineLogging enabled while stepping through code with many local variables. The requested behavior is to avoid sequentially fetching every local variable during stepping, fetching watched or requested variables promptly and the rest lazily or on demand.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100