Linked by Thom Holwerda on Tue 28th Aug 2012 19:20 UTC, submitted by MOS6510
Thread beginning with comment 532918
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
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:
2010-06-24
I'm using logging and print to "debug" stuff 95% of the time. Yet, sometimes debuggers are useful, especially if you're dealing with segfault or memory allocation issues which are pretty damn hard to find with print.
Also, valgrind is a very good tool.