What are your best tips for debugging Python?
Please don't just list a particular debugger without saying what it can actually do.
Related
- What are good ways to make my Python code run first time? - This discusses minimizing errors
What are your best tips for debugging Python?
Please don't just list a particular debugger without saying what it can actually do.
Defining useful repr() methods for your classes (so you can see what an object is) and using repr() or "%r" % (...) or "...{0!r}..".format(...) in your debug messages/logs is IMHO a key to efficient debugging.
Also, the debuggers mentioned in other answers will make use of the repr() methods.