On Jan 26, 2021, at 18:16, Grant Edwards <grant.b.edwa...@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 do the first two, but if I get really stuck, I use the pudb debugger (https://pypi.org/project/pudb/). Using that, I can see all the locals, jump to any point in the stack and see the locals there, or shell into ipython if I need to run some quick code. For me, this is much faster than trying to write an additional program that is close enough to the problem code to be useful. -- Ed Leafe -- https://mail.python.org/mailman/listinfo/python-list