Is there a way to attach a debugger to a multi-threaded Python process?
<p>I'm trying to debug a deadlock in a multi-threaded Python application after it has locked up.  Is there a way to attach a debugger to inspect the state of the process?  </p>

<p>Edit: I'm attempting this on Linux, but it would be great if there were a cross-platform solution.  It's Python after all :)</p>

<p>Use <a href="http://winpdb.org/">Winpdb</a>. It is a <strong>platform independent</strong> graphical GPL Python debugger with support for remote debugging over a network, multiple threads, namespace modification, embedded debugging, encrypted communication and is up to 20 times faster than pdb.</p>

<p>Features:</p>

<ul>
<li>GPL license. Winpdb is Free Software.</li>
<li>Compatible with CPython 2.3 through 2.6 and Python 3000</li>
<li>Compatible with wxPython 2.6 through 2.8</li>
<li>Platform independent, and tested on Ubuntu Gutsy and Windows XP.</li>
<li>User Interfaces: rpdb2 is console based, while winpdb requires wxPython 2.6 or later.</li>
</ul>

<p><img src="http://winpdb.org/images/screenshot%5Fwinpdb%5Fsmall.jpg" alt="Screenshot"></p>
