This debugger_visualizer attribute does seem like a really cool capability. It's about embedding debugging scripts for debug tools, in your rust source code; couldn't be more direct! https://doc.rust-lang.org/nightly/reference/attributes/debug...
This debugger_visualizer attribute does seem like a really cool capability. It's about embedding debugging scripts for debug tools, in your rust source code; couldn't be more direct! https://doc.rust-lang.org/nightly/reference/attributes/debug...
Though that “only” dates back to 2020 so people with experience older than that would have had a worse experience, and may have ended once bitten twice shy as a result never noticing the improvements.
No it isn't? IDE debugging works just as well for Rust as it does for C++ in my experience - better even. Yes it sometimes shows raw internals of complex containers instead of the logical structure, but it does for C++ too.
In Rust I can just click "Debug test" next to any test and it will start it in a debugger flawlessly. Zero effort to set up. I've never seen anything close to that in C++.
Of course as someone else said, you need a debugger far far less in Rust than C++.
I'm a non-proud printf() debugger. I understand that if I get use to debugger debugging it'd be in many ways better. The thing is, it's an entirely different paradigm of development, and paradigm shifts can come with significant productivity cost. Of course, learning, growing and getting comfortable with new/different tools is part of being a software engineer.
I also see people who use them all the time but reluctantly - I'd love to know what the difference is.
What if you have to solve a bug outside of the development loop though? E.g. a bug somewhere in the whole system after you've done your development, where you don't have a root cause yet?
Compared to this gdb is just meh. I know, I know, Rust compiles to a nice binary, there's no runtime/vm/interpreter/JIT/intermediate-language/bytecode...
but that's not what I miss in gdb, I miss the discoverability, the visual representation, the whole I from the IDE concept.