【问题标题】:Pydev debugger stopped working in PyCharm after Python upgradePython 升级后 Pydev 调试器在 PyCharm 中停止工作
【发布时间】:2016-12-13 15:37:04
【问题描述】:

我使用 PyCharm。我之前使用 Python 3.3 构建了 pydev 调试器 python /Applications/PyCharm.app/Contents/helpers/pydev/setup_cython.py build_ext --inplace。 然后我不得不更新我的项目以使用 Python 3.5 下的新虚拟环境,现在调试器将无法运行,并显示以下消息:

/<venv_path>/bin/python3.5 /Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py --multiproc --save-signatures --qt-support --client 127.0.0.1 --port 58286 --file /Applications/PyCharm.app/Contents/helpers/pycharm/pytestrunner.py -p pytest_teamcity <pytest_root> <options>
Testing started at 10:25 AM ...
pydev debugger: process 94521 is connecting

Connected to pydev debugger (build 163.8233.8)
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1596, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 956, in run
    time.sleep(0.1)  # busy wait until we receive run command
KeyboardInterrupt

我尝试在更新的 Python 版本下重新运行 setup_cython.py build_ext --inplace,使我的缓存无效,重新启动,删除我的 .idea 文件夹,但没有任何方法可以解决上述消息。

【问题讨论】:

  • 我能够通过在新克隆的存储库中创建一个项目来重新使用调试器,这意味着还有一些其他缓存对象,我采取的所有上述步骤都不足以真正实现清除 PyCharm 项目在源文件之外的引用。我仍然很想知道其他人是否曾经解决过这个问题。

标签: pycharm pydev


【解决方案1】:

我通过清除所有保存的断点解决了这个问题。

在启动时设置环境变量 PYCHARM_DEBUG=True 导致我得到这个解决方案。

【讨论】:

  • 我重新制作了项目并删除了旧项目,但感谢您为后代发布此内容。我确实注意到了,因为 PyCharm 中的断点周围存在一些陈旧的参考错误,而我在 Intellij 中没有看到类似的错误。
  • 我通过在第二行添加:# -*- coding: utf-8 -*- 来解决同样的问题
猜你喜欢
  • 2013-02-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-08-14
相关资源
最近更新 更多