How to Debug Docker Containers (Python + VSCode)

sidpalas

sidpalas

Posted on July 20, 2020

How to Debug Docker Containers (Python + VSCode)

When containers are working they are amazing and make running your code across different environments seamless...

However, when something goes wrong, the additional layers of abstraction can make debugging them difficult.

Here are three techniques you can use to debug them:

1) Override the entrypoint at runtime and exec into the container
2) Copy files into or out of the container for inspection/comparison
3) Run a remote debugger inside the container and attach to it over the network

I created a video walking through how to use these three techniques:

Leave your own tips in the comments!

💖 💪 🙅 🚩
sidpalas
sidpalas

Posted on July 20, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related