How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

Dietmar Schwertberger maillist at schwertberger.de
Wed Jan 27 14:34:27 EST 2021


On 27.01.2021 01:52, Skip Montanaro wrote:
> Agree with Grant on these points. I certainly use gdb to debug C code
> (like the interpreter), but for Python code, tracebacks and print
> statements pretty much take care of things.
I thought so for the first 12 year of using Python.
For the last 12 years I have been using an IDE/debugger with built-in 
console.

It boosted productivity by at least a factor of two.


Sometimes "python -i ..." and "import pdb" is good enough, being able to 
inspect variables after an exception.
I have the impression that pdb as post mortem debugger is not well known...

Regards,

Dietmar




More information about the Python-list mailing list