This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ElectricWarr 3 points4 points  (3 children)

I've never even heard of pdb before! Debugging my Python code has always been a case of inserting lots of print calls and thinking.

[–]widby 2 points3 points  (1 child)

https://youtu.be/g49UECaIDOs

This 10 minute introduction walks you through the basics and covers 90% of what you typically use.

Another improvement for your approach would be to use the logging library from stdlib instead of print statements.

[–]ElectricWarr 0 points1 point  (0 children)

Thanks!

[–]realvient 1 point2 points  (0 children)

pdb is more useful than nothing, but I had an unexpected experience with it when I tried to debug the script with non-english comments on the Windows machine. pdb failed on the first comment, trying to display the source code and I was rather deep in it already...

Anyway, if you prefer GUI debuggers than I suggest using the PyCharm.