[developer productivity improvement] Running awx components in vscode debugger (#14942)

Enable VSCode debugger integration when attaching VSCode to with AWX docker-compose development environment container

- add debugpy launch target in `.vscode/launch.json` to enable launching awx processes with debugpy
- add vscode tasks in `.vscode/tasks.json` to facilitate shutting down corresponding supervisord managed processes while launching process with debugpy
- modify nginx conf to add django runserver as fallback to uwsgi (enable launching API server via debugpy)
This commit is contained in:
Hao Liu
2024-03-07 14:31:50 -05:00
committed by GitHub
parent b71645f3b1
commit 3f2f7b75a6
6 changed files with 233 additions and 2 deletions

View File

@@ -29,6 +29,10 @@ http {
server localhost:8050;
}
upstream runserver {
server localhost:8052;
}
upstream daphne {
server localhost:8051;
}

View File

@@ -38,4 +38,12 @@ location {{ ingress_path }} {
uwsgi_read_timeout 120s;
uwsgi_pass uwsgi;
include /etc/nginx/uwsgi_params;
error_page 502 = @fallback;
}
# Enable scenario where we shutdown uwsgi and launching runserver for debugging purposes
location @fallback {
# Add trailing / if missing
rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;
proxy_pass http://runserver;
}