Hacker News new | ask | show | jobs
by devereaux 2705 days ago
Even if you have everything working just the way it should, in the majority of cases print debugging is enough because problems boil down to the assumptions in your head about what should be a variable not being reflected by what it is in your program.

You write tests? Consider selecting variables of interest (and printing them to STDERR when debug mode is on) like one of many test.

Looking at memory and all the variables has its place, but as you said only "here and there" - because when you have to do that, you have already lost: you are looking for a needle in a (hay)stack, and will lose much more time that just eyeballing the variables of interest you selected before.