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

You are missing out on the important point: printing forces you to formulate a hypothesis: what you expect and to compare with what you actually get. Debugging encourages less modeling and more trying random stuff until something sticks.

It is an exaggeration. In practice, it is useful to apply both. Novices can get some insight using debugging, more experienced with code base people should exercise their understanding of the code and use well picked prints.



You can also do print debugging with a debugger. Just have a breakpoint that doesn't halt, but instead simply prints the values of interest to the debugger console. This is particularly nice for things like debugging interrupt handlers where the time taken to print output normally is too much to accept.


Watched variables they were called once upon a time.

Also, I think what you suggest to do here is way harder to learn than printing.


Perhaps, but that lends credence to the theory that people using print debugging may just not have learned how to effectively use a debugger yet.




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

Search: