microsoft / microsoft/vscode-cpptools
vectors and arrays are truncated in debug view.
@sean-mcmanus is already working on this.
Since Apr 14, 2026.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and version: Windows 11
- VS Code: latest
- C/C++ extension: 0.4.6
- GDB / LLDB version: microsoft debugger
Bug Summary and Steps to Reproduce
When debugging large containers (e.g., vectors with thousands of elements), the VS Code debugger stops displaying element values after an arbitrary index. Instead, entries appear as empty ({}), even though the data is actually present.
Expanding an individual element reveals that the data exists and is correctly populated, which indicates this is a UI/display limitation rather than a data or debugger issue.
Expected Behavior
The debugger UI should:
- Display values for all visible elements in the watch/locals window.
- Use lazy loading / virtual scrolling to fetch only the elements currently in view.
- Dynamically request additional data as the user scrolls.
Actual Behavior
After a certain number of elements, entries are shown as {} (empty).
Values only appear when manually expanding each node.
This makes inspecting large datasets impractical.
Impact
This significantly reduces the usability of the debugger for:
Numerical computing
Graphics / simulation data
Any workload involving large arrays or vectors
Performance optimizations (like limiting displayed elements) should not come at the cost of hiding valid data.
- Suggested Improvement
Implement viewport-based data fetching:
- Query debugger engine only for visible rows (with small buffer)
- Load additional elements on scroll
- Maintain responsiveness without sacrificing visibility
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.
Assessment
This issue has not been assessed yet.