Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HashMap not rendered properly when using MSVC debugger #92286

Closed
selvavm opened this issue Dec 26, 2021 · 0 comments · Fixed by #93626
Closed

HashMap not rendered properly when using MSVC debugger #92286

selvavm opened this issue Dec 26, 2021 · 0 comments · Fixed by #93626
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. O-windows-msvc Toolchain: MSVC, Operating system: Windows

Comments

@selvavm
Copy link

selvavm commented Dec 26, 2021

When I was working in a Rust project few months back, I was able properly visualize Hashmap in the debugger pane of VSCode when using MSVC debugger. Now it is showing Raw data. Is the structure of HashMap changed which needs a modification to Natvis file?

I tried this code:

fn main() {
    println!("Hello, world!");
    let mut hash_map = HashMap::new();
    hash_map.insert("Test1".to_string(), "Test1".to_string());
    hash_map.insert("Test2".to_string(), "Test2".to_string());
    hash_map.insert("Test3".to_string(), "Test3".to_string());
    println!("End, world!");
}

I expected to see this happen: The debugger pane showing key and value combination

Instead, this happened: Showing the raw data and pointers
image

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-pc-windows-msvc
release: 1.57.0
LLVM version: 13.0.0
@selvavm selvavm added the C-bug Category: This is a bug. label Dec 26, 2021
@wesleywiser wesleywiser added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) O-windows-msvc Toolchain: MSVC, Operating system: Windows labels Dec 27, 2021
@bors bors closed this as completed in 775e480 Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. O-windows-msvc Toolchain: MSVC, Operating system: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants