16

My app is running inside a docker image (My development team never install software in their machines, only the docker images have the dependencies).

I Need to debug something using pycharm debugger, how do I connect pycharm's debugger to the docker image's python?

1 Answer 1

12

One possible method is to treat your Docker container as a remote host and use remote debugging: https://www.jetbrains.com/pycharm/help/remote-debugging.html

Sign up to request clarification or add additional context in comments.

3 Comments

Do you know how to successfully enable ssh server inside my docker image in order to remote debug it?
You'll need to install sshd. Maybe you can convince your team to update the docker image with sshd, or you can create your own based off the original image. You'll need to be running both your python application and your ssh server at the same time, so you might want to use supervisord or maybe a solution like phusion-baseimage.
Please check stackoverflow.com/a/43541732/7619689 for an up-to-date solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.