I'm trying to use Xdebug with docker and docker-machine.
Here my xdebug.ini config file:
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_log=/tmp/php5-xdebug.log
Here my docker-compose.yml file:
data:
image: busybox
volumes:
- ./:/srv
web:
build: docker/nginx
volumes_from: [data]
links:
- fpm
ports:
- "80:80"
fpm:
build: docker/php-fpm
volumes_from: [data]
ports:
- "9000:9000"
I have configured PHPStorm like this:
When I try to debug a page. This window appear:
If I click ok for this window, then xdebug seem to work.
If I look at the Debugger pan I can see I'm on my root page. (app.php). But PHPStorm don't highlight the current line.
Is my configuration correct ?
Am I missing something ?
Thanks.
I finally manage to resolve this issue.
Once you have create the server, here it's Docker
You have to create a Run/Debug configuration. Add a new PHP Remote Debug with the configured server and ide key Then click on the debug button and it's work !