Unable to display frame variables (PyCharm remote

2019-02-20 05:54发布

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?

1条回答
该账号已被封号
2楼-- · 2019-02-20 06:42

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

查看更多
登录 后发表回答