Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug django app running inside docker image, using pycharm debugger

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?

like image 907
silva96 Avatar asked Apr 14 '15 18:04

silva96


People also ask

How do I debug a docker in PyCharm?

We can now see the Run/Debug configuration at the top of the PyCharm window and that the buttons (for run, debug, etc.) are enabled. If you now set breakpoints in your Django app and press the debug button next to the Run/Debug configuration, you can debug the Django app running inside the Docker container.

Can I use PyCharm with Docker?

PyCharm provides Docker support using the Docker plugin. The plugin is bundled and enabled by default in PyCharm Professional Edition. For PyCharm Community Edition, you need to install the Docker plugin as described in Install plugins.


1 Answers

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

like image 144
Gigablah Avatar answered Oct 09 '22 16:10

Gigablah