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

Stepping through code is only useful when you know where the code diverged from your expectations. If you proactively log well enough, you sometimes understand the state of the program well enough to bypass the debugger completely.

If hope is involved, you could have almost certainly saved the same time by thinking more carefully.



I am totally agree. It's easier to invest into code to catch and explain unusual situations than to waste time on debugger. I.e., instead of setting of breakpoint in a location, it is easier to write an assert with all necessary debug information (e.g. values of variables, path to files, name of units, etc.). Assert will work 24x7 instead of me. Moreover, error message doubles as a built-in test and a documentation. Asserts also will work in production, when debugging is not possible at all.




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

Search: