Draco
Draco

Reputation: 61

How to debug Python running in Docker using VSCode?

I have some python 3.11 code running that I lauched via docker-compose up and I want to debug that code and see what data it's processing. I would like to use my VSCode to step through the Python code running in docker on my local machine. Is there any way to do this? I would like to know step by step how to modify my existing Dockerfile(s) and docker-compose.yml so that I can attach and debug/step from VSCode. Thanks. Update: I did see https://code.visualstudio.com/docs/devcontainers/tutorial but it's not specific to Python nor does it show what to do with existing Dockerfile/Docker-compose in terms of modifications.

Upvotes: 0

Views: 27

Answers (0)

Related Questions