XDebug refuses to work with Docker after the 2017.3 update

Hello, after I updated to 2017.3 (from 2017.1 I believe), phpstorm refuses to connect to xdebug. I've followed all the tutorials here to set it up again from scratch, to no avail. When I try to run a phpunit test with debugging, the test passes and I get ""Connection with Xdebug 2.5.5 was not established. Validate installation." When I press Validate Installation, it passes, and it says to check configuration (which I haven't changed and I know is good.) The php.ini contains all the proper config.


The config, which has always worked for me:


The phpstorm settings are set to listen to the default port 9000.

The one strange thing I'm noticing is that in the PHP interpreter dialog, if I press the "show phpinfo" button, the xdebug.remote_log value is always blank, even if I add it to the ini xdebug configuration file that's being loaded (according to the show phpinfo page). I don't know what to make of this. Thus I can't view xdebug logs. If I run phpinfo() from within the docker container, it does shows the correct setting and the chosen log file.

Any ideas?


I'm experiencing the same issue after updating to PhpStorm-2017.3.2. Downgrading to PhpStorm-2017.2.4 restores xdebug functionality, so it's definitely an issue introduced in the latest PhpStorm.


Hi Aaron, unfortunately downgrading doesn't resolve the issue for me so I am stuck without a debugger :(


Unfortunately, we do really need to take a look at the Xdebug remote log.

even if I add it to the ini xdebug configuration file that's being loaded (according to the show phpinfo page)

What if you change other parameters in there, do they have effect (comparing to remote_log)?


Hi Eugene, I didn't try what you said yet, but the solution to the problem can be found in the comments here, to add an additional configuration option: https://youtrack.jetbrains.com/issue/WI-38060

This is a docker for mac specific issue.


I have the same issue now even when I set up my php.ini with 




(which worked for me two weeks ago) I get the same error as described above.

The only solution is to go to the Preferences -> Languages & Frameworks -> PHP -> CLI Interpreter -> Configuration options
and add a new configuration directive "xdebug.remote_host" with value "docker.for.mac.localhost". And this solved my problem. 


Please sign in to leave a comment.