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:
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
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
You can optionally run pdb manually - see: http://docs.python.org/library/pdb.html
精彩评论