Debugging inside a Docker container

I've seen lots of posts about running/debugging Python apps in a Docker container and none of them are working for me. I've got the Docker build setup, it builds the container using the Dockerfile and the app comes up. I've got the port defined so I can connect to the web app. I've got PyCharm setup to use a remote interpreter from inside the container. But no debug connection is made with the app when I start it up in debug mode. I'm clearly missing something obvious, that I assumed was done "automagically" when I started up the Docker container in debug mode. Help?

3 comments
Comment actions Permalink

What error do you get when trying to run the debugger?

Do you use Docker or SSH interpreter?

0
Comment actions Permalink

I don't get an error. It just clearly isn't debugging inside the container. The interpreter is the remote interpreter setup by the Docker integration. I'm clearly missing something obvious. I assumed that when I selected Debug and the container built and started up, that I would be able to debug. But I suspect that only starts the container and not a debugger. Do I need a remote debugging setup? 

0
Comment actions Permalink

No additional configuration is required.
If there is no error, how do you determine that it isn't debugging? Could you share a screenshot?

0

Please sign in to leave a comment.