Docker Compose Django Debug Follow
Answered
I've followed tutorial for setting up Docker Compose with remote python interpreter.
https://www.jetbrains.com/help/pycharm/using-docker-compose-as-a-remote-interpreter.html#debug
Everything works well - starting and composing services, manage.py commands etc. apart from debugging. Pycharm just won't stop on specific breakpoint and prints in PyCharm status bar - "Waiting for connection"
Did anyone experienced same issue?
Please sign in to leave a comment.
Hi! Could you please create a sample project for reproducing the issue?
I am having the same issue with PyCharm 2018.1.1 with two different projects.
I'm having exactly the same issue - latest pycharm version
I've just verified the following two things:
1. It did work with Pycharm 2017.3
2. It "kind of" works if you don't have an entrypoint script in your Dockerfile. If you have
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
it kind of works, if you have
ENTRYPOINT ["somescript.sh"]
and somescript.sh calls "python manage.py runserver 0.0.0.0:8000" it doesn't work.
It's exactly as Ckreuzberger is saying. As long as you have defined entrypoint in your Dockerfile or docker-compose, the debugger won't stop because it gets overridden by entrypoint. Once you remove it, it works perfectly.
Sharing my Docker configuration here.
Dockerfile
Thank you for the detailed explanation, I created a ticket to track this problem in our bug tracker: PY-29771. Please feel free to vote/comment.