How to Debug Using Daphne Server, Debugpy and VSCode #1164
LeandroCGMS
started this conversation in
General
Replies: 2 comments
-
https://global.discourse-cdn.com/business7/uploads/djangoproject/original/2X/1/154e21fbb10590571f41c45f7f3bfc4ac30a5b4b.png |
Beta Was this translation helpful? Give feedback.
0 replies
-
Could you share the logs for that repro? If you're launching the process under the debugger from VSCode, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my project with Gunicorn, NGINX reverse proxy, docker containerization, Angular and Django, after solving a configuration with a timeout for Gunicorn, I was able to debug, normally, using VSCode, debugpy, this one started inside the “wsgi.py” file, but now the same steps are not enough to get debugging working using Daphne server.
I tried several alternatives, like “python -m debugpy --listen 0.0.0.0:8005 manage.py runserver 0.0.0.0:8000”, also “import debugpy
debugpy.listen((“0.0.0.0”, 8005))", in addition to having tried to start the Daphne server, directly, with " export DJANGO_SETTINGS_MODULE=“djangoBrEditor.settings”
daphne -b 0.0.0.0 -p 8000 djangoBrEditor.asgi:application --websocket_timeout 3600 --websocket_connect_timeout 3600 --application-close-timeout 3600".
Debugpy runs and I get a response from it with “telnet localhost 8005”, but VSCode doesn't stop at breakpoints like it did with Gunicorn.
Beta Was this translation helpful? Give feedback.
All reactions