我已经成功地将PyDev与Eclipse成功使用了几年。最近它开始忽略断点......不是一直都是,它们偶尔会工作,但大部分时间(即使是相同的代码)。 我搜索并看到这篇文章非常有用: pydev breakpoints not working
我也有sys.gettrace()返回None Windows 8.1上的Python 2.7.8
我把trace_func放在我的代码的开头,最后是下面的代码。 rocket.py函数在这里: https://github.com/web2py/web2py/blob/master/gluon/rocket.py#L166
我不确定下一步该做什么&解决问题。 非常感谢任何帮助:)
Context: isEnabledFor File: C:\Bin\Python27\lib\logging\__init__.py Line: 1359 Event: return
Context: info File: C:\Bin\Python27\lib\logging\__init__.py Line: 1159 Event: return
Context: close File: C:\Bin\web2py\gluon\rocket.py Line: 166 Event: call
Context: close File: C:\Bin\web2py\gluon\rocket.py Line: 167 Event: line
Context: close File: C:\Bin\web2py\gluon\rocket.py Line: 168 Event: line
Context: close File: C:\Bin\web2py\gluon\rocket.py Line: 169 Event: line
Context: close File: C:\Bin\web2py\gluon\rocket.py Line: 176 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 192 Event: call
Context: close File: C:\Bin\Python27\lib\socket.py Line: 195 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 196 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 198 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 198 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 198 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 198 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 198 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 198 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: line
Context: close File: C:\Bin\Python27\lib\socket.py Line: 197 Event: return
Context: close File: C:\Bin\web2py\gluon\rocket.py Line: 176 Event: return
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 150 Event: call
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 161 Event: line
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 162 Event: line
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 163 Event: line
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 166 Event: line
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 167 Event: line
Context: _qsize File: C:\Bin\Python27\lib\Queue.py Line: 200 Event: call
Context: _qsize File: C:\Bin\Python27\lib\Queue.py Line: 201 Event: line
Context: _qsize File: C:\Bin\Python27\lib\Queue.py Line: 201 Event: return
Context: get File: C:\Bin\Python27\lib\Queue.py Line: 168 Event: line
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 308 Event: call
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 331 Event: line
Context: _is_owned File: C:\Bin\Python27\lib\threading.py Line: 299 Event: call
Context: _is_owned File: C:\Bin\Python27\lib\threading.py Line: 302 Event: line
Context: _is_owned File: C:\Bin\Python27\lib\threading.py Line: 306 Event: line
Context: _is_owned File: C:\Bin\Python27\lib\threading.py Line: 306 Event: return
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 333 Event: line
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 334 Event: line
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 335 Event: line
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 336 Event: line
Context: _release_save File: C:\Bin\Python27\lib\threading.py Line: 293 Event: call
Context: _release_save File: C:\Bin\Python27\lib\threading.py Line: 294 Event: line
Context: _release_save File: C:\Bin\Python27\lib\threading.py Line: 294 Event: return
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 337 Event: line
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 338 Event: line
Context: wait File: C:\Bin\Python27\lib\threading.py Line: 339 Event: line
答案 0 :(得分:0)
常见的问题是,每当Python进入某种递归错误的情况时,它就会停止调试器。
你可以在Python上看到报告:https://bugs.python.org/issue10933(所以,通常的技巧是设置一个跟踪功能,直到打印停止打印,这意味着跟踪被自动禁用的位置Python)的
作为一种解决方法,您可以像使用pdb一样使用程序化断点(键入'pydevd'并请求代码完成,模板将以正确的方式显示以生成pydevd.settrace())。
在这种情况下,您可以在调试模式下启动,也可以使用远程调试器 - 有关如何使用远程调试器的详细信息,请参阅:http://pydev.org/manual_adv_remote_debugger.html。
答案 1 :(得分:0)
我也遇到了忽略断点的同样问题。这个.... 在挤压窗口 - >显示视图 - >点击断点 - >使跳过所有断点禁用
如果在show view中看不到断点,请转到other-> debug->断点
这可能有用