I’m trying to remote-debug a Python service that runs inside a Docker container using PyCharm 2025.2.3 on macOS.
I do have an active license, but the IDE no longer shows any obvious way to attach to a running debugpy session.
Environment
macOS Sequoia PyCharm 2025.2 (licensed) Docker Desktop 4.x Python 3.10 in container debugpy 1.8.x
What I’m doing
Inside the container I start the service like this:
python -m debugpy --listen 0.0.0.0:5678 --wait-for-client devenv/bin/app.py --port 6000 # (it seems like hung forever)
and my docker-compose.yml includes:
ports:
- "6000:6000"
- "5678:5678"
From my Mac I can confirm that the port is open:
nc -vz localhost 5678
# Connection succeeded
So the network part works.
What actually happens
Neither Attach to debugpy nor Attach to Process appears in the list of run configurations for Pycharm.
The only thing available is Python Debug Server. I have specified the IDE host name as: 0.0.0.0, port as 5678 and added path mapping. But while I am trying to start debugging, it keeps saying "Address already in use".
My questions
Did Pycharm remove “Attach to debugpy” / “Attach to Process” in PyCharm 2025.2?
If not, how can I enable or restore the missing remote-attach workflow?
Is there a new supported way to attach to debugpy inside Docker without using the Docker Interpreter?
Any known work-arounds (plugins, registry settings, manual templates)?
EDIT
I’ve already configured the Python debug server in my PyCharm IDE (screenshot below):
But, whenever I am clicking Debug button, I am getting error as Address already in Use.
I’m not sure what’s causing this conflict or what the recommended steps are to resolve it.
Could someone please outline the exact steps required to properly configure and start the remote debug server (for example, how to run the app.py inside container, docker-compose changes required (if any), address and port to mention in Pycharm debug server configuration)?
Any detailed guidance would be greatly appreciated.
