Debugging threaded Python code

D

Derek Thomson

Hi,

I frequently have to debug some fairly tricky Python multi-threaded
code, and I need some help using the debugger to help me diagnose the
problems when they occur. Yes, I know that the best option with threaded
code that is problematic is to rewrite it, but that's not really an
option that I have (right now).

What would really help me is to be able to see a list of all the
currently active threads, and the Python stack trace for each. At least
then I could see where the failures are happening - deadlocks in
particular. I have to spend a lot of time right now just to reach that
point.

I spent some time trying to achieve this with the Python debugger and
couldn't. This has been bugging me for quite a while now, and I'm
probably just missing the obvious as usual. Is there some simple way I
can do this?

Thanks,
Derek.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top