Skip to content

Some debugger variable display issues #70542

Closed
@DeanRoddey

Description

@DeanRoddey

This may be a dup but I didn't see one right off hand.

Visual Studio Code: 1.43.2
Rust 1.42.0
Toolchain: stable-x86_64-pc-windows-msvc
C/C++ VSC extension: 0.26.3
Rust RLS: 0.7.0

VSCRustCharVal

Not displaying char variables

The debugger always shows an unspecified error for the value of char variables. Presumably this is some issue getting the right symbol info to the debugger?

Optimizing even if in debug profile

[Here I think I need to retract this part of my complaint, since it appears that all of these I've seen so far are actually misleading messages, where the variable is reported as optimized out when really it's just not in scope.]

Also, despite the optimization level being zero, locals keep getting optimized away, or at least the debugger thinks they are. I have seen others complaining about this as well, both on MSVC and Gdb so it doesn't seem specific to this tool chain. You can see in the image above a local claiming to have been optimized away, even though it's a debug build with optimization at zero.

Sometimes it's enough to make debugging fairly unproductive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions