Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

std::unordered_map values display as "(,)" in hover/variables panel with cppvsdbg debugger

Đang mở
#14,362 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
devtools

Hướng nghiên cứu

Tái hiện vấn đề với thiết lập MSVC/cppvsdbg được cung cấp, sau đó kiểm tra cách xử lý natvis của trình gỡ lỗi mở rộng các mục std::unordered_map và đánh giá các biểu thức std::pair::DisplayString. So sánh đầu ra khi di chuột và trong bảng Variables với các biểu thức Watch đang hoạt động; hoàn tất khi mỗi mục hiển thị khóa và giá trị của nó thay vì (, ).

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug debugger help wanted

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.

Image

Steps to Reproduce

  1. Declare and populate a std::unordered_map<int, float> variable.
  2. Start debugging (via CMake Tools, using cppvsdbg).
  3. 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.
Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
58

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-cpptools

Tất cả issue của microsoft/vscode-cpptools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.