How to combine "Remote debugging with the Python remote debug server configuration" and "Debug multithreaded applications"? Follow
The doc examples are always nice and simple, but real life has these two combined. I am trying to remote debug a django app. I added the debugging code to the manage.py script of django, which looks like following:
pydevd_pycharm.settrace('192.168.254.50', port=12345, stdoutToServer=True,
if __name__ == "__main__":
from django.core.management import execute_from_command_line
This connects to the pycharm debugger but stays on the line
and I don't see any further output. How can I attach the debugger to all the background processes which are getting started, like the daphne server or the channels asgi threads?
Please sign in to leave a comment.
Which interpreter type do you use? If you use SSH interpreter, there's usually no need to use remote debug serever, as you can debug directly with the SSH interpreter https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html (it describes two ways of debugging).
If you must use remote debug serever -- it's not needed to run settrace() in the manage.py. You can place settrace() code into views and other code, and the debugger should connect as well.