Skip to content
Permalink
Browse files

Merge pull request #115 from progonkpa/add-xdebug-remote-host-ip

Alleviate manual XDebug config by using new Docker DNS name.
  • Loading branch information...
eko committed Oct 9, 2019
2 parents ad32f7c + 64f6e37 commit 34dba2b2f8d58f46ea98b3ff595b95f92df39511
Showing with 4 additions and 5 deletions.
  1. +3 −2 README.md
  2. +0 −2 docker-compose.yml
  3. +1 −1 php-fpm/xdebug.ini
@@ -66,8 +66,9 @@ You can also use Kibana to visualize Nginx & Symfony logs by visiting `http://sy

# Use xdebug!

To use xdebug change the line `"docker-host.localhost:127.0.0.1"` in docker-compose.yml and replace 127.0.0.1 with your machine ip addres.
If your IDE default port is not set to 5902 you should do that, too.
Configure your IDE to use port 5902 for XDebug.
Docker versions below 18.03.1 don't support the Docker variable `host.docker.internal`.
In that case you'd have to swap out `host.docker.internal` with your machine IP address in php-fpm/xdebug.ini.

# Code license

@@ -19,8 +19,6 @@ services:
- ./logs/symfony:/var/www/symfony/var/log:cached
links:
- db
extra_hosts:
- "docker-host.localhost:127.0.0.1"
nginx:
build: ./nginx
ports:
@@ -3,4 +3,4 @@ zend_extension=xdebug.so
[Xdebug]
xdebug.remote_enable=true
xdebug.remote_port=5902
xdebug.remote_host=docker-host.localhost
xdebug.remote_host=host.docker.internal

0 comments on commit 34dba2b

Please sign in to comment.
You can’t perform that action at this time.