1
I have a network of containers created with docker-compose
. The Xdebug settings are passed in part by the file .yml
and in part by an archive .ini
consumed by PHP.
I know that Xdebug is installed correctly in the container because it appears in phpinfo()
and modifies the error outputs. I also know from the access logs that the container sees the connections coming from the host
in the IP 172.18.0.1
, which is an internal network IP created by Docker (on my network Ips are 192.168.x.x
).
In the hosts file of my computer I create entries in the format 127.0.0.1 example.com
to access the site through the browser. Everything ok, except that Phpstorm never receives information from Xdebug, even with the most diverse confidings, even with the current configuration - that theoretically would connect back to any IP that has a Debugger turned on:
[Xdebug]
xdebug.idekey = PHPSTORM
xdebug.default_enable = 1
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_host = 172.18.0.1
xdebug.remote_log = /var/log/remote.log
If I understand the working of Xdebug, what is missing now is a way for it to send (from inside the container) the debugging information to 172.18.0.1:9000
and this information is received on my computer (192.168.x.x:9000
). How to make this bridge?