Depends on what I'm doing. I tend to think of debugging as roughly split into algorithmic and systemsy debugging: do I think I've messed up an algorithm, or do I have some messed-up software-engineering stuff like component interaction or memory management?
For algorithmic debugging I tend to do mainly printf debugging. In fact usually more like: read and mentally trace the code, and then printf a few things just to make sure they're what I expect them to be.
I use "real" debuggers if it's a more systemsy thing, like a bunch of interacting components, or inexplicable weird crashes.
For algorithmic debugging I tend to do mainly printf debugging. In fact usually more like: read and mentally trace the code, and then printf a few things just to make sure they're what I expect them to be.
I use "real" debuggers if it's a more systemsy thing, like a bunch of interacting components, or inexplicable weird crashes.