this post was submitted on 22 Nov 2023
20 points (100.0% liked)
Rust
6049 readers
64 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't agree with the sentiment that debuggers are sub-optimal for Rust and that's why they are not used. In C++, I hop in gdb all the time, and I'm very fluent with it. But I never had the need for it in Rust. So they may be sub-optimals, IDK, I never had an issue in Rust where the best tool would have been a debugger.
I would never do printf debugging in C++ because it's too complicated to do. In Rust with Display/Debug it's a breeze. And my best debugger for Rust is the compiler itself. But most importantly, most of my bugs are caught at compile time. The few remaining one are logic error and best analyzed with logging, aka printf debugging, and not a debugger that can pause the execution.