Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#14,362 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
cpp
領域
devtools

調査の方向性

提供された MSVC/cppvsdbg セットアップで問題を再現し、デバッガーの natvis 処理が std::unordered_map のエントリをどのように展開し、std::pair::DisplayString 式をどのように評価するかを調べます。ホバー時と Variables パネルの出力を、動作する Watch 式と比較します。各エントリに (, ) ではなくキーと値が表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
1日 4時間
マージ済み PR(30日)
58

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-cpptools のほかの issue

microsoft/vscode-cpptools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。