I
I
Igor2021-08-02 18:04:33
SSH
Igor, 2021-08-02 18:04:33

How can I open a tunnel so that XDebug can connect to the client?

Colleagues, welcome.
How can I open a tunnel so that XDebug can connect to the client?

What do I want to do?
I want XDebug to be able to connect to my client to debug the application.

I explain the situation.
The client and Docker are running on different hosts.
In the docker log, I see that XDebug reports that it could not connect to the client.

The difficulty lies in the fact that this is remote debugging in docker.
Php that is spinning in the docker cannot connect to my host, but I really want to.

NOTICE: PHP message: Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port)


6108094318ed1148994087.png

The interesting thing is that if you pull from the container

. For example, this is the project page on VUE
curl http://host.docker.internal:3000

. That is, there is access to the host.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2021-08-02
@karabanov

The Magic of SSH
A reminder to ssh users

I
Igor, 2021-08-02
@IgorPI

Went the easiest way, installed ngrok
ngrok tcp 9003
At least something...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question