hans

hans

【Others】Pycharm无法debug解决办法


错误提示:

Traceback (most recent call last):
  File "/snap/pycharm-professional/139/helpers/pydev/pydevd.py", line 36, in <module>
    from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info
  File "/snap/pycharm-professional/139/helpers/pydev/_pydevd_bundle/pydevd_additional_thread_info.py", line 17, in <module>
    from _pydevd_bundle.pydevd_cython_wrapper import PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock
  File "/snap/pycharm-professional/139/helpers/pydev/_pydevd_bundle/pydevd_cython_wrapper.py", line 38, in <module>
    trace_dispatch = mod.trace_dispatch
AttributeError: module '_pydevd_bundle_ext.pydevd_cython' has no attribute 'trace_dispatch'

有两个地方,一个只管当前脚本,一个管项目下所有脚本。在这两个地方的环境变量处添加一句话就好了。

下图是只管当前脚本的:

1668717154622.jpg

下图管项目下所有脚本的:

1668717161764.jpg

在 Environment variables 中添加:

PYDEVD_USE_FRAME_EVAL=NO;PYDEVD_USE_CYTHON=NO
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.