Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Funny thing is that thanks to rust compiler I never had a need to debug my code :-)


It may be true that this holds for issues related with out-of-bounds accesses or temporal safety errors, but nothing eludes your application to contain logic bugs. In fact, whenever the application is big enough and you spot a logic error, the debugging burden is still there. Good part is that the debugging utilities for C/C++ are still helpful for Rust programs.


Usually, understanding the type system changes you code/thinking about business logic too. That stems from the habit of thinking about how to check your expected behaviour before implementing it.

Needing a debugger still happens once in a while, but languages/projects that are well adapted to this way of thinking really make it extremely uncommon.


So true. With proper type driven design you basically don't need a debugger anymore.

But I still find it helpful when you need to check what's wrong in other people's code, since they might not design with types like I do.


I find myself using the debugger to explore complex types created by procedural macros. You can use cargo to expand them andnpoke around, or dump the structure to debug if it derives it, but sometimes the debugger seems easier.

Also it can help find why something three crates deep into your dependency tree panicked.


Debuggers aren’t only for debugging. They’re also for exploring an unfamiliar codebase, speeding up the process of familiarising oneself with it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: