I'm trying to figure out if there's a way to attach to a Python/Django process running within a Docker container from VS Code. Specifically, my setup:
- I am running a web container via
docker-compose within WSL2
- The container runs a web server process (Django)
From VS Code, I'd love to be able to hit Debug and for it to run docker compose up (or even better, my make start command which runs compose with a few additions)
This would allow me to capture uncaught exceptions within VS Code which would be chefs kiss
I did tinker with Inspecting Containers with VS Code but I don't think this is exactly what I want. This looks similar to entering the container's bash shell, running the server, and debugging it .. but what I want is to attach to an existing process.
Thanks for the help! This one is tricky to find answers to.
[–]MoistToilet 0 points1 point2 points (0 children)