无法显示框架变量(PyCharm远程调试器) [英] Unable to display frame variables (PyCharm remote debugger)

查看:502
本文介绍了无法显示框架变量(PyCharm远程调试器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出了什么问题?

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

无法显示框架变量

我猜这是同样的问题:链接

我尝试了什么?

我找到了这个链接,并提供了可能的解决方案,但对我不起作用.基于此解决方案,我对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))

,但仍然无法正常工作.我仍然看不到变量.

有人知道如何解决吗?

解决方案

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

参考

What's the problem?

I set up in PyCharm (version 2016.1.4) remote-debugging using the remote interpreter (not Debug Server!) as described here: jetbrains website.

When I run in Debug mode the program stops at the break point as it should. But, in the Variables window the variables are not displayed. Instead I get the following Error:

Unable to display frame variables

I guess this is the same problem: link

What did I try?

I found this link with a possible solution, but it doesn't work for me. Based on this solution, I modified my helpers/pydev/_pydevd_bundle/pydevd_constants.py file as follows:

From:

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))

To:

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))

but it still doesn't work. I still cannot see the variables.

Anybody any idea how to fix it?

解决方案

In recent versions of PyCharm, the option has moved to the main settings dialog. You can enable it under Settings | Python Debugger | Gevent compatible debugging.

Reference

这篇关于无法显示框架变量(PyCharm远程调试器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆