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

Grant Edwards grant.b.edwards at gmail.com
Tue Jan 26 19:16:03 EST 2021


On 2021-01-26, C W <tmrsg11 at gmail.com> wrote:

> How do you troubleshooting/debugging in Python?

Mostly I read exception trace and read the code and think about it.

If that doesn't work, I add some print() or syslog() calls.

If I really get stuck, I try to write as small a program as possible
that demonstrates the problem.

> I know hardcore computer scientists would tell me about Python debugger.

I've been writing Python for 20+ years. I've never tried a debugger.

--
Grant



More information about the Python-list mailing list