How to debug WSGI app in PyCharm (e.g. using twistd)?
Answered
Hi,
A quick search turns up a post about this question from a few years back however it does not work. Putting the twistd executable in the "scripts" field of the configuration produces a convoluted executable statement like this
<path>/python /home/<path>/pycharm-2017.1.3/helpers/pydev/pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 44445 --file /home/<path>/bin/twistd -d ../../web web --port tcp:port=9099 --wsgi WEB.application
Is this correct or is there some other problem here? One issue I see is the parameters to twistd are not being captured and passed because they are most likely consumed by the pydevd script.
Please sign in to leave a comment.
Hi! Unfortunately, we don't support it: in order to start Run configuration you should specify a Python executable. But you can attach debugger to a running python process with " Attach to Local Process..." action (Run | Attach to Local Process...)