PyCharm debugger stopping containers after "Waiting for connection" ends

已回答

I am trying to debug docker-compose containers.

Here is how my run configuration looks like:

Note that it is a Django app. When I try to start the debugger it is successfully starting all containers and I can access the app on the browser for a short amount of time. Also there is a background task running "Waiting for connection"

Right after it ends, the containers are suddenly stopped.

What am I doing wrong?

 

0
正式评论

Hi! This problem looks similar to yours: https://youtrack.jetbrains.com/issue/PY-29850. Could you please add a comment under this issue? Does any of your breakpoints work?

Avatar
Permanently deleted user

hi

facing exact same issue

any progress so far?

0

I had same problem with my docker-compose.
I have ENTRYPOINT in my Dockerfile. When I started debugger  it wrote "Waiting for connection". 

Solution is add line with

entrypoint: ''

to file docker-compose.yml for corresponding service 

Problem happens because "additional configuration file" set option "command". And the run command into the docker might look like this:

/bin/sh run.sh python -u /opt/.pycharm_helpers/pydev/pydevd.py --multiprocess --qt-support=auto --port 51310 --file /opt/project/manage.py run-server

 

When you comment ENTRYPOINT in Dockerfile or set blank entrypoint in docker-compose.yml start command will be correct.

 

2

请先登录再写评论。