logoalt Hacker News

ComputerGuruyesterday at 2:16 PM8 repliesview on HN

So when will we get tier 1 debugging support in Visual Studio?


Replies

MaulingMonkeyyesterday at 6:30 PM

IDK about "tier 1" but I'll note I've used VS for debugging and profiling Rust binaries. I even wrote a tool to auto-generate a wrapper .sln so I can easily launch from VS: https://github.com/MaulingMonkey/cargo-vs

The main pain point IME was poor debugger visualizers for standard containers and enums. I fixed some of that for the standard containers by writing some natvis files for std: https://github.com/rust-lang/rust/issues?q=state%3Aclosed%20... . Admittedly, they broke a few times. They also weren't automatically included in the pdbs, so I wrote a crate for that: https://github.com/MaulingMonkey/natvis-pdbs . And then someone crated and stabilized #[debugger_visualizer] for rust itself, which can do the same job: https://doc.rust-lang.org/reference/attributes/debugger.html .

(...I should check on enum visualization, but I suspect it's still poor.)

flohofwoeyesterday at 2:23 PM

Optimistic to assume that modern day programmers even know what a debugger is, or if they do, consider it as anything else than some weird ancient shibboleth only used by the greybeards ;)

show 3 replies
pjmlpyesterday at 2:19 PM

You have it already on VSCode, which isn't quite the same, however nowadays it is an open question which one is more relevant for Microsoft's management, especially given that VS isn't cross platform (see Azure), and is stuck with WPF/.NET Framework.

jeroenhdyesterday at 4:31 PM

println!() already works, who needs more than that?

Kidding aside, VS Code has excellent debugging support already. Unless you need to share your Rust code base with a legacy C/C++ code base, I don't think VS is the best environment for Rust programming.

There are good use cases for staying within full-fat VS's capability set (drivers, among other things), but I don't think Microsoft needs to add Rust to VS in this much of a hurry.

mrecyesterday at 2:21 PM

I'd also love to see MS sponsoring Windows support for a modern linker like mold or wild.

show 1 reply
uncle_kostyatoday at 6:28 AM

Works already in Visual Studio Code, even seamlessly between C++ and Rust

dethswatchyesterday at 3:39 PM

RustRover, my friend.

show 1 reply
thrwaway73637yesterday at 6:32 PM

u dont debug rust mate if it compiles it works