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

前端 未结 9 2201
日久生厌
日久生厌 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:20

    Use Winpdb. It is a platform independent 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.

    Features:

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


    (source: winpdb.org)

提交回复
热议问题