std::unordered_map values display as "(,)" in hover/variables panel with cppvsdbg debugger
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Reproduce the issue with the supplied MSVC/cppvsdbg setup, then inspect how the debugger's natvis handling expands std::unordered_map entries and evaluates std::pair::DisplayString expressions. Compare hover and Variables-panel output with the working Watch expressions; done means each entry displays its key and value instead of (, ).
Written by the indexing model from the issue text.
Description
Environment
- VS Code version: 1.115.0
- cpptools extension: ms-vscode.cpptools 1.31.4
- OS: Windows 11
- Compiler: MSVC (Visual Studio Community 2022, amd64)
- CMake Kit: Visual Studio Community 2022 Release - amd64
Bug Description
When debugging a C++ project built with MSVC (VS2022), std::unordered_map<int, float> values are displayed as (,) in both the hover tooltip and the Variables/Watch panel.
Steps to Reproduce
- Declare and populate a
std::unordered_map<int, float>variable. - Start debugging (via CMake Tools, using cppvsdbg).
- Hover over the variable or expand it in the Variables panel.
Expected Behavior
Each entry should display as [key] = value, e.g. [3] = 0.5.
Actual Behavior
Each entry displays as [3] = (, ).
Additional Notes
begin()->firstandbegin()->secondboth evaluate correctly in the Watch panel, so debug info is intact.- The issue appears to be that
std::pair::DisplayStringexpressions ({first},{second}) fail when rendered as part of unordered_map expansion in vsdbg's natvis engine. std::vectordisplays correctly.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 58
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.
More from microsoft/vscode-cpptools
-
bug Language Service regression
microsoft/vscode-cpptools#14795 · 1 comment · 1 assignee ·
-
bug Language Service parser
microsoft/vscode-cpptools#14794 · 1 comment · 1 assignee ·
-
more info needed
microsoft/vscode-cpptools#14793 · 2 comments · 1 assignee ·
-
more info needed
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-cpptools#14787 · 1 comment · 1 assignee ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Openbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 comment · 1 assignee ·
All issues in microsoft/vscode-cpptools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
AOSSIE-Org/DebateAI#582 · 2 comments ·