0

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

phpinfo

I can see in phpinfo that Xdebug is enabled.

I can validate Xdebug in PhpStorm:

validate Xdebug

And here are settings in my PhpStorm:

Xdebug port listening

debug configuration

server configuration

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
  • 1
    First of all: collect and check Xdebug log -- it will tell where it tries to connect etc. Then you can start looking at other stuff. Commented Jan 30, 2020 at 21:47
  • What is the value of the xdebug.remote_handler setting in phpinfo()? Commented Jan 31, 2020 at 9:36

2 Answers 2

0

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)

Sign up to request clarification or add additional context in comments.

1 Comment

That bug is only relevant if you have other strange third party extensions loaded. And it's fixed in 2.9.2 which I released yesterday
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.