Remote debugging of gevent application does not work

In our application we use gevent like this:
import gevent.monkey
gevent.monkey.patch_all()
prettyPrint();
What I want is to enable debugging once and then be able to set breakpoints wherever I need.
Unfortunately that doesn't seem to work. I tried to insert:
import pydevd
pydevd.settrace('192.168.99.1', port=25000, stdoutToServer=True, stderrToServer=True, suspend=False)
prettyPrint();
before and after the patch_all statement with little to no success. When added before, the application simply does not work (workers are exited by timeout). When added after, I'm able to debug the only one process.

The workaround would be to import pydevd and settrace in every function I want to debug, that's rather inconvenient and very frustrating.

Am I missing something and there is an option to debug gevent-based apps as easy as any normal python application?

I'm using PyCharm 3.4.1 and set the "Gevent compatible debugging" option.
1 comment
We are having the same problem.  Any progress?
0

Please sign in to leave a comment.