News for hackers. Stuff that matters.
Re:Things I Don’t Know as of 2018 by porknubbins on Thursday November 26, 2020 @06:12PM (#25224229)
I’ve found that the more state and code paths to the bug, or the more confused I am about the bug the more likely I am to need a bunch of print statements. Debugging for me is a fine scalpel that works great when I think I precisely understand what is going on but my code appears to be doing something impossible. Starting stepping at the top of a program and just looking for what goes wrong is a usually a huge time sink.
Re:Things I Don’t Know as of 2018 by saagarjha on Friday November 27, 2020 @04:48AM (#25227070)
Debuggers are in almost all cases a superset of print statements. However, you have to learn how to use them effectively since there’s so much you can do. I assure you that single stepping to the problem is not how to use a debugger to find problems ;)