Is there a way to attach a debugger to a multi-threaded Python process?

前端 未结 9 2202
日久生厌
日久生厌 2020-12-13 18:49

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?

9条回答
  •  醉酒成梦
    2020-12-13 19:21

    pdbinject allows you to inject pdb into an already running python process.

    The pdbinject executable only works under python2, but can inject into python3 just fine too.

提交回复
热议问题