How can I tell where my python script is hanging?

后端 未结 13 795
醉话见心
醉话见心 2020-12-04 08:10

So I\'m debugging my python program and have encountered a bug that makes the program hang, as if in an infinite loop. Now, I had a problem with an infinite loop before, but

13条回答
  •  孤城傲影
    2020-12-04 08:31

    You could also try http://code.activestate.com/recipes/576515-debugging-a-running-python-process-by-interrupting/ . It should work as long as the Python process doesn't have signals masked, which is normally the case even if Ctrl-C doesn't work.

提交回复
热议问题