microsoft / microsoft/vscode-cpptools

[Feature Request] [gdb] Support Variable Paging

Open
#2,700 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger Feature Request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.