The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.
— Brian Kernighan, UNIX for Beginners, 1979.
Twenty-five years later this still seems true. Most programmers I know debug by printing stuff out. Even Linus Torvalds has famously criticized debuggers.

Why is that? It's not technology - there are some beautiful integrated debuggers that let you hook deep into running code and poke around. And it's not ignorance, at least for me - I've had many happy experiences with fancy debuggers in the past. But I still keep going back to printing stuff out.

Why? For me it's about simplicity. Running a debugger on an active process is often awkward. And it's a bit spooky: I never quite fully understand what's going on. Still I can't help but feel like I'm working with stone age tools.

tech
  2004-01-24 19:01 Z