this post was submitted on 22 Nov 2023
19 points (100.0% liked)

Rust

5999 readers
46 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

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
top 1 comments
sorted by: hot top controversial new old
[–] robinm@programming.dev 3 points 11 months ago

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.