Skip to content

Instantly share code, notes, and snippets.

@curious-broccoli
Created May 14, 2024 13:26
Show Gist options
  • Save curious-broccoli/314483140faa560f5ea3357759331fb6 to your computer and use it in GitHub Desktop.
Save curious-broccoli/314483140faa560f5ea3357759331fb6 to your computer and use it in GitHub Desktop.
Debugging dockerized django (with automatically reloading development server) using VS Code's debugger
# rest of the service declaration here
command: python -m debugpy --listen 0.0.0.0:3000 manage.py runserver 0.0.0.0:8000
# rest of the service declaration here
{
"version": "0.2.0",
"configurations": [
{
"name": "Django Debugger: Attach",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 3000
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/app",
"remoteRoot": "/app"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment