hans

hans

【其他】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
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。