开发者

How to step through debug twisted?

I'd like to be able to debug Punjab, a twisted python application, in Netbeans so that I can step through the code. How can I do that? Alternatively, how c开发者_JS百科ould I do it in a different debugger?


Since you're trying to debug a twisted application, you have a few options:

  1. If you're running via twistd you can use the -b command-line options:

       -b, --debug            run the application in the Python Debugger (implies
                              nodaemon), sending SIGUSR2 will drop into debugger
    
  2. You can run manhole in your twisted process - this allows you to telnet into the server and examine Python objects - http://twistedmatrix.com/documents/current/core/howto/telnet.html

  3. You can optionally run pdb manually - see: http://docs.python.org/library/pdb.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜