I am trying to install my project in a Docker. Everything works good except for Xdebug which does not want to stop on breakpoints. I am using the latest version of Docker, macOS, Xdebug. PHP 7.1, Apache 2.4.
Here are settings I’ve got:
I added these lines to php.ini
zend_extension = "/usr/lib/php/20190902/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port=9003
xdebug.remote_host=host.docker.internal
xdebug.idekey=PHP_STORM
xdebug.remote_connect_back=0
I can see in phpinfo that Xdebug is enabled.
I can validate Xdebug in PhpStorm:
And here are settings in my PhpStorm:
Ports in docker-compose file are only set 8888:80
Could you please advice, am I missing something?
P.S. if I try to install Xdebug locally, it works fine. But I need it to be working with Docker.
2
Answers
Sorry for such a long response. I just disabled my laptop that evening, enabled it next day and everything started worked.Really weird thing. But thanks for advises.
Which version if php-debug ? There is a bug in 2.9.1 that cause a segmentation fault when xdebug.remote_enable=1 (see https://github.com/xdebug/xdebug/pull/544)