1

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):

enter image description here

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.

1
  • Both "in a container" and "on a remote system" will make it significantly harder to debug your issue, particularly if you want to test out potential fixes. Can you reproduce the same issue locally in a non-container virtual environment? Commented Oct 23 at 13:16

1 Answer 1

4

PyCharm 2025.2* has no debugpy support, and "Attach to Process" works with local processes only

your options ...

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

2 Comments

Thanks. Would this setup also work with PyCharm Community Edition?
only option 1, as remote debug and Docker support is Pro only

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.