In our application we use gevent like this:
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:
pydevd.settrace('192.168.99.1', port=25000, stdoutToServer=True, stderrToServer=True, suspend=False)
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.