无法显示帧变量(PyCharm远程调试器)

时间:2016-09-27 15:27:47

标签: pycharm remote-debugging gevent

有什么问题?

我在PyCharm(版本2016.1.4)中使用远程解释器(不是Debug Server!)进行远程调试,如下所述:jetbrains website

当我在调试模式下运行时,程序会在断点处停止。但是,在“变量”窗口中,不显示变量。相反,我得到以下错误:

  

无法显示帧变量

我想这是同样的问题:link

我尝试了什么?

我发现这个link有一个可能的解决方案,但它对我不起作用。基于此解决方案,我修改了helpers/pydev/_pydevd_bundle/pydevd_constants.py文件,如下所示:

自:

try:
    SUPPORT_GEVENT = os.getenv('GEVENT_SUPPORT', 'False') == 'True'
except:
    # Jython 2.1 doesn't accept that construct
    SUPPORT_GEVENT = False

# At the moment gevent supports Python >= 2.6 and Python >= 3.3
USE_LIB_COPY = SUPPORT_GEVENT and \
               ((not IS_PY3K and sys.version_info[1] >= 6) or
                (IS_PY3K and sys.version_info[1] >= 3))

要:

try:
    SUPPORT_GEVENT = os.getenv('GEVENT_SUPPORT', 'False') == 'True'
    try:
        import gevent
        SUPPORT_GEVENT = True
    except:
        SUPPORT_GEVENT = False
except:
    # Jython 2.1 doesn't accept that construct
    SUPPORT_GEVENT = False

# At the moment gevent supports Python >= 2.6 and Python >= 3.3
USE_LIB_COPY = SUPPORT_GEVENT and \
               ((not IS_PY3K and sys.version_info[1] >= 6) or
                (IS_PY3K and sys.version_info[1] >= 3))

但它仍然无效。我仍然看不到变量。

任何人都知道如何解决它?

1 个答案:

答案 0 :(得分:4)

在PyCharm的最新版本中,该选项已移至主设置对话框。您可以在“设置”下启用它Python调试器| Gevent兼容调试。

Reference