Gevent debug support

Good news for everyone who uses gevent!

Since the last PyCharm 2.6 EAP our visual debugger is able to deal with gevent monkey-patched code.

To enable it just edit python/helpers/pydev/ in PyCharm installation and set the constant SUPPORT_GEVENT=True

Your feedback is welcome as always!

Update: 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.

This entry was posted in Cool Feature. Bookmark the permalink.

12 Responses to Gevent debug support

  1. Trung Ly says:

    This helped me out a lot. Thanks!

    Any plans to do it in a non-hackish (like in Settings) way in the future?

  2. Lew says:

    This is great. We’ve been using this a ton!

    Having trouble getting remote debugging with gevent working though. Is this supported? (I can connect but breakpoints aren’t being hit.)



  3. Lukman says:

    I become a Jetbrains clenit past year, buying the Personal License for PyCharm 1.0, but my license will expire next month in October, 28.I’ve to buy a new license for the version 2.0, if the final release occur after the expiration of my license or I’ll be called to renew my license? Sorry, but I really don’t know how is the process to continue to getting support for PyCharm.Thanks in advance.

  4. Hann says:

    Setting SUPPORT_GEVENT = True raises

    Exception KeyError: KeyError(4332526160,) in ignored

    while debugging. The problem is attached to importing threading module before monkey patching. My platform is PyCharm 2.7.3 build #129.782

    Those who face the same problem, please confirm.

  5. tracy jones says:

    I am also having an issue where i can connect but breakpoints are not being hit. I set
    GEVENT_SUPPORT on the client side and enabled gevent debugging on the server side. But no breakpoints.

  6. fefe says:

    in pycharm
    my solution works

    cd /Applications/PyCharm
    under import gevent add one line: SUPPORT_GEVENT = True

    SUPPORT_GEVENT = os.getenv(‘GEVENT_SUPPORT’, ‘False’) == ‘True’
    import gevent
    SUPPORT_GEVENT = True #add this line
    # Jython 2.1 doesn’t accept that construct

  7. Amir says:

    This fix worked for me, but then today it stopped working and I get the RecursiveError on S3 access when I run a unittest (what I got before the fix).
    Version: pycharm-community-2018.2.2
    Fixed File: /helpers/pydev/_pydevd_bundle/
    Python: 3.6.9
    Any suggestion?
    Thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *