Skip to content

include msvc rust-specific information formatters #1195

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

Open
rbtcollins opened this issue Dec 21, 2024 · 3 comments
Open

include msvc rust-specific information formatters #1195

rbtcollins opened this issue Dec 21, 2024 · 3 comments
Labels
enhancement Enchancement request

Comments

@rbtcollins
Copy link

There is a discussion that notes in VSCode that people are getting an error/warning about debug information formatters with codelldb on Windows.

Developers are steered to CodeLLDB by the vscode Rust ecosystem; the codelldb note that is referred to from that bug says that 'as it is assumed that users will primarily use WinDbg or Microsoft Visual Studio's debugger for this target' - I think that this assumption is wrong.

It would be great to include the rust debug information formatters for codelldb with the msvc toolchain.

@rbtcollins rbtcollins added the enhancement Enchancement request label Dec 21, 2024
@Walnut356
Copy link
Contributor

Rust formatters were a part of codelldb until 1.11, at which point they were deliberately replaced with the formatters distributed by rust itself to decrease the maintenance burden on codelldb.

Rust did not include LLDB and GDB formatters with *-msvc distributions for some reason. As of this pr, that is no longer the case. While the formatters will exist in *-msvc distributions, they still don't function very well. That is actively being worked on by myself and a few others. In the meantime, they're just python scripts so they can altered/copied/replaced to improve their functionality locally.

@tanveerbadar
Copy link

Rust formatters were a part of codelldb until 1.11, at which point they were deliberately replaced with the formatters distributed by rust itself to decrease the maintenance burden on codelldb.

Rust did not include LLDB and GDB formatters with *-msvc distributions for some reason. As of this pr, that is no longer the case. While the formatters will exist in *-msvc distributions, they still don't function very well. That is actively being worked on by myself and a few others. In the meantime, they're just python scripts so they can altered/copied/replaced to improve their functionality locally.

Looking at your PRs, it seems the fixes won't be available till 1.87 comes out? Needless to say, the currently horribly broken enum displays make working with my enum heavy codebase a total pain and I can't wait for these fixes.

@Walnut356
Copy link
Contributor

Correct, as of now all of the patches for baseline functionality have landed and once 1.87 is released, everything should work out of the box.

If you're willing to use nightly, you can take advantage of the changes right away.

The compiler patch to fix enum discriminants should be included in stable 1.86. iirc the patch that lands in 1.87 is purely changes to the python scripts. As such, when 1.86 comes out you can grab the lldb_commands, lldb_providers.py, lldb_lookup.py and rust_types.py from the current main branch of rust and replace the files in your locally installed *-msvc toolchain.

Using those files on 1.85 will still be an improvement for things like Vec, Hashmap, and tuples, but sum-type enums wont be able to determine which variant to display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enchancement request
Projects
None yet
Development

No branches or pull requests

3 participants