DEV Community

Discussion on: Using Print Statements Are A Handy Way to Debug and Explore Code

 
yaser profile image
Yaser Al-Najjar

In addition the debugger should not be any more time consuming than the print statement

I developed recently in django and spinning the debugger takes more time than printing and re-running the app.

It always depends, sometime running the shell and trying things out there is really much faster.

Print statements for debugging are no faster than debugging, but they are more dangerous

When you try this stuff in Android development (esp. Xamarin Android), you will change this line :D

enough of those especially in a loop can absolute MURDER performance

Generally you won't test a loop or an algorithm by hand / debugger, you would write logical tests against it... and run those tests till you get green ;)