what can cause pdb.set_trace() to be ignored?

Viewed 11306

I'm trying to debug a Python program and I inserted a classic 'import pdb;pdb.set_trace()' line in a function, just before a call which generates a stack trace. However that call seems to be ignored, i.e. nothing happens and I don't get a pdb prompt.

At that point of the program, there is only one active thread. No monkey patching of the pdb module was detected.

Any help on what could cause the call to set_trace to be ignored is welcome. Thanks.

Platform info: Debian squeeze + python 2.6.5

Code extract:

import threading
print threading.active_count()
import pdb
print pdb
pdb.set_trace()
print "*****"
root_resource.init_publisher() # before changing uid

output:

<lots of stuff>
1
<module 'pdb' from '/usr/lib/python2.6/pdb.pyc'>
*****
<stack trace in init_publisher>
3 Answers
Related