【问题标题】:Pycharm debugger getting error when break point is keptPycharm调试器在保留断点时出错
【发布时间】:2020-09-14 08:35:13
【问题描述】:

**在我的一个项目中,我在 Pycharm IDE 2019.2 上使用 Django==2.1.5,并且在调试时遇到此错误

1)我尝试通过删除.idea文件夹并重新配置来解决此问题,但问题没有解决。

2)我已经尝试卸载python并重新安装,问题没有解决。

3)我已经更新了Pycharm并尝试了,问题没有解决同样的错误正在抛出。**

Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x0576E6F0>
Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_constants.py", line 328, in get_current_thread_id
AttributeError: '_DummyThread' object has no attribute '__pydevd_id__'

During handling of the above exception, another exception occurred:

SystemError: ..\Objects\codeobject.c:851: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 718, in __call__
  File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_constants.py", line 335, in get_current_thread_id
  File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_constants.py", line 302, in _get_or_compute_thread_id_with_lock
SystemError: <built-in method __enter__ of _thread.lock object at 0x0144ADA0> returned a result with an error set

【问题讨论】:

    标签: django python-3.x debugging pycharm


    【解决方案1】:

    根据您提供的简短描述,我只能假设问题调试模式下运行应用程序时发生。如果是这种情况,请尝试在您的run/debug configuration in PyCharm 中设置以下环境变量,看看问题是否仍然存在:

    PYDEVD_USE_CYTHON=NO
    PYDEVD_USE_FRAME_EVAL=NO
    

    请注意,这是一个临时修复 - 您应该进一步调查问题的确切原因以及解决问题的其他方法。


    还请注意,将来,您应该提供有关项目配置的更多详细信息,异常发生的位置和时间(重现场景),以及可能导致异常的其他信息更容易成功识别问题。

    【讨论】:

      猜你喜欢
      • 2015-10-14
      • 2015-02-08
      • 2020-02-16
      • 2023-03-25
      • 2016-08-27
      • 2020-05-09
      • 2016-05-15
      • 2020-08-31
      • 1970-01-01
      相关资源
      最近更新 更多