|| at Nov 29, 2010 at 4:53 pm
On Nov 29, 7:01?am, Leo Jay wrote:
I'd like to know how do you guys find out what's happening in your
code if the process seems not work.
In java, I will use jstack <pid> to check stacks of threads and lock status.
But I don't know how to do it in python.
If you give a CTRL-C the Python process will die with a traceback
showing the line where the process
got stuck (assuming you started it from the command-line). You can
even run the script under the debugger and give a CTRL-C after a
while, as follows:
$ python -m pdb thescript.py
<wait a bit ...>
(Pdb) <inspect the variables and continue if you like>