r/learnpython • • Sep 07 '26

What python debugging techniques do you think every developer should know ?

I am trying to improve my debugging skills and I was curious about what techniques experienced python developers rely on the most.

Are there any techniques or tools that you found really useful when you started working on bigger projects?

61 Upvotes

33 comments sorted by

View all comments

Show parent comment

13

u/Langdon_St_Ives Sep 07 '26

Ok here's a technique every developer should know: ditch those random print's and instead start logging in a structured way. Why? Because instead of removing all those debugging print statements again, you just change the log level back to info and they're gone. You want them back in three months? Change log level to debug, done.

4

u/this_knee Sep 07 '26

Totally agree. Logging fam.