Unable to display frame variables (PyCharm remote debugger)

醉酒当歌 提交于 2019-12-03 23:11:41

问题


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:


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



来源:https://stackoverflow.com/questions/39728624/unable-to-display-frame-variables-pycharm-remote-debugger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!