Skip to main content


People tend to look down on print debugging as it's not using sophisticated tools at all. You're not using debuggers or profilers or sophisticated loggers.

But don't look down on print debugging. It's the tool that works for all languages. It's easy to understand and easy to implement. It focuses the mind on thorough reading and understanding of code, rather than getting lost in a forest of data.

Print debugging is really effective in many cases.

#programming

in reply to Martijn Faassen

I once read that devs start with print debugging, move on to debuggers and profilers, and as experts return to print debugging.

It seems legit. The important part is to understand when the debugger is going to help more, and know how to use it at that point.

in reply to Jens Finkhäuser

@jens I once had to dig through a big code base to make a small modification. No idea where to go, so I littered the code with prints.
print 1
print 2
print 3
...
That way I was able to quickly find the module responsible for the change to do.