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()->first and begin()->second both evaluate correctly in the Watch panel, so debug info is intact.
- The issue appears to be that
std::pair::DisplayString expressions ({first}, {second}) fail when rendered as part of unordered_map expansion in vsdbg's natvis engine.
std::vector displays correctly.
Environment
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
std::unordered_map<int, float>variable.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.std::pair::DisplayStringexpressions ({first},{second}) fail when rendered as part of unordered_map expansion in vsdbg's natvis engine.std::vectordisplays correctly.