pdb attach?

H

Hynek Hanke

Hello,

please, is there something like 'attach' in pdb yet? My application uses
threads
and when it freezes (e.g. due to a deadlock situation), I'd like to get
the traceback
of all threads and inspect at which point did the application get into
problems.
Or could I send a signal to such a python process so that it would
output backtraces
from all threads before terminating?

Because currently, if a thread runs into deadlock problems (or a thread
fails on
an exception and the other thread can't join it), I have no way of
determining
what went wrong.

Such processes are not possible to terminate via CTRL-C in the
interpreter, so
I can't get the backtrace this way. Furthermore, I also need to debug
subprocesses,
so these are difficult to invoke interactively.

I'm happy for any suggestions.

Thank you,
Hynek Hanke
 
N

Nir

Hello,

please, is there something like 'attach' in pdb yet? My application uses
threads
and when it freezes (e.g. due to a deadlock situation), I'd like to get
the traceback
of all threads and inspect at which point did the application get into
problems.
Or could I send a signal to such a python process so that it would
output backtraces
from all threads before terminating?

Because currently, if a thread runs into deadlock problems (or a thread
fails on
an exception and the other thread can't join it), I have no way of
determining
what went wrong.

Such processes are not possible to terminate via CTRL-C in the
interpreter, so
I can't get the backtrace this way. Furthermore, I also need todebug
subprocesses,
so these are difficult to invoke interactively.

I'm happy for any suggestions.

Thank you,
Hynek Hanke

Try to debug with winpdb:
http://www.digitalpeers.com/pythondebugger/

Any feedback will be appreciated.
 

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,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top