Hacker News new | past | comments | ask | show | jobs | submit login

I'd argue that print and log statements are just poor man's debugger. I don't deny the use and usefulness of logging in general, just it's use for debugging. In order to catch a bug you need to cast a very wide net of print statements. Debugger allows you to seamlessly travel up and down the stack frames, look at different variables on the spot and investigate different code execution paths, even the ones that you didn't not expect you would at the start of the session. Doing the same with log statements is amazingly inefficient.



I’d call the debugger a nuclear powered print statement. Printing allows you to view particular state at a specific point in program flow; this is often all that is necessary to identify the bug. Doing the same thing with a debugger is amazingly inefficient.

...obviously this is mildly fascetious, but I want to point out the absurdity of assuming debugging is a difficult endeavor. That’s how it becomes a difficult endeavor.




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

Search: