我希望能够在 Netbeans 中调试 Punjab(一个扭曲的 Python 应用程序),以便我可以单步执行代码。我怎样才能做到这一点?或者,我如何在不同的调试器中执行此操作?
最佳答案
由于您正在尝试调试扭曲的应用程序,因此您有几个选择:
如果您通过 twistd 运行,您可以使用 -b 命令行选项:
-b, --debug run the application in the Python Debugger (implies nodaemon), sending SIGUSR2 will drop into debugger
您可以在扭曲的进程中运行沙井 - 这允许您远程登录到服务器并检查 Python 对象 - http://twistedmatrix.com/documents/current/core/howto/telnet.html
您可以选择手动运行 pdb - 请参阅:http://docs.python.org/library/pdb.html
关于python - 如何逐步调试扭曲?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2501136/