pydev 调试器不工作但可以 运行 代码正常

pydev debugger not working but can run code fine

我正在使用 Liclipse,它基本上是带有 eclipse 的 pydev。 python 文件运行良好,但是当我尝试在同一个文件上使用 pydev 调试器时,调试器无法启动,而且我找不到任何关于此错误的信息。它是pydev中的错误吗?它甚至说 "During handling of the above exception, another exception occurred"

我正在使用 python 3.7.1

warning: Debugger speedups using cython not found. Run '"C:\Users\q4116\AppData\Local\Programs\Python\Python37-32\python.exe" "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\setup_cython.py" build_ext --inplace' to build.
pydev debugger: starting (pid: 20104)
Traceback (most recent call last):
  File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 134, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
AttributeError: '_MainThread' object has no attribute 'additional_info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1951, in <module>
    main()
  File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1945, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1295, in run
    self.notify_thread_created(thread_id, t)
  File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 662, in notify_thread_created
    additional_info = set_additional_thread_info(thread)
  File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 138, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
  File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 147, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
  File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 95, in _pydevd_bundle.pydevd_cython_win32_37_32.PyDBAdditionalThreadInfo.__init__
AttributeError: '_pydevd_bundle.pydevd_cython_win32_37_32.PyDBAdditionalThreadInfo' object has no attribute 'pydev_state'

我在更新这些软件包后遇到了同样的问题:

  • Oomph 安装程序 1.11.0.v20181107-0652 org.eclipse.oomph.setup.feature.group Eclipse Oomph 项目
  • PyDev for Eclipse 7.0.0.201811071319 org.python.pydev.feature.feature.group法比奥·扎德罗兹尼
  • PyDev for Eclipse 开发者资源 7.0.0.201811071319 org.python.pydev.feature.source.feature.group Fabio Zadrozny

不是 运行 LiClipse,而是 Eclipse + pydev。

我现在通过恢复更新解决了这个问题。单击帮助 > 关于 Eclipse IDE > 安装详细信息 > 安装历史 > 单击上一个工作版本 > 还原

我应该保留错误信息,以便我可以提交正确的错误报告...

很抱歉。这是 PyDev 7.0.0 中的错误。我刚刚为 PyDev 上传了一个新版本,LiClipse 也差不多了(限制因素是我的互联网连接速度,所以,应该在几个小时内可用)。

与此同时,删除加速器(如果需要在本地重新创建)应该可以使其再次运行。即:删除 _pydevd_bundle*.pyd 和 _pydevd_bundle\pydevd_frame_eval*.pyd 并在本地执行 setup_cython.py(或者如果您可以在没有加速器模块的情况下继续进行,则不要执行)。