4 ms·
I don't think there is anything wrong with "printf" debugging. I actually use Rust's dbg!()[0] macro quite often since it is quick to add and it gives me a good
by demindiro 4y ago
I don't think there is anything wrong with "printf" debugging. I actually use Rust's dbg!()[0] macro quite often since it is quick to add and it gives me a good idea of the program's flow of execution. Doing the equivalent with a debugger is much more tedious IMO since you need to set up all breakpoints and then either manually continue after each breakpoint or configure your debugger to print something at each point.
Usually when I use a debugger it's after I already narrowed the problem down to a specific section and I need to view more state than dbg!() can practically show me.
[0]: https://doc.rust-lang.org/std/macro.dbg.html https://doc.rust-lang.org/std/macro.dbg.html