我在 Netbeans IDE 下调试 Python 程序时遇到问题。当我开始调试时,调试器会写入以下日志和错误。感谢您的帮助。
[LOG]PythonDebugger : overall Starting >>>[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>c:\documents and settings\aster\.netbeans\6.7\config\nbpython\debug\nbpythondebug\jpydaemon.py args = ['C:\\Documents and Settings\\aster\\.netbeans\\6.7\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '11111'] localDebuggee= None JPyDbg connecting localhost on in= 11111 /out= 11112 ERROR:JPyDbg connection failed errno(10061) : Connection refused Debug session normal end ERROR :: Server Socket listen for debuggee has timed out (more than 20 seconds wait) java.net.SocketTimeoutException: Accept timed out
感谢回答
最佳答案
我昨天刚安装了 Python for NetBeans,还没有试过调试器,所以试了一下,我得到了同样的错误。所以我认为这可能是防火墙问题,禁用了我的防火墙并重试,然后它起作用了。
但是我重新启动了防火墙,现在它还在工作,所以我不知道。我看到 Python 的 Netbeans 选项有一个输入来指定开始监听端口(我的是 29000 而不是像你的 11111)。
关于Netbeans 中的 Python 调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1606746/