Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to display frame variables (PyCharm remote debugger)

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?

like image 756
RichArt Avatar asked Nov 27 '25 00:11

RichArt


1 Answers

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

like image 197
RichArt Avatar answered Nov 30 '25 00:11

RichArt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!