Linked by Thom Holwerda on Tue 28th Aug 2012 19:20 UTC, submitted by MOS6510
Thread beginning with comment 532871
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Indeed, with print statements you can see how the program at particular point behaves, how the over all picture looks and then easily figure out the issue how to fix it, because bugs are rarely on a single line, instead they are often broken logic and with debuggers you will not see the big picture.
especially if you're dealing with segfault or memory allocation issues which are pretty damn hard to find with print.
Of course.
Importantly for me though is debugging by printing does the important thing of making you review design in the process. You're actively testing your own assumptions of how the design is working. I find that people who use debuggers most of the time tend to fix problems locally rather than wondering if a slight alteration to a design would eliminate whole classes of defects. This makes it even better for learning a new language.




Member since:
2007-02-18
I've always found well targeted print statements more helpful than debuggers, even for complex software, and not just for the purposes of debugging, but for learning a new language as the article is suggesting.