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.
https://gyazo.com/268cfeca8748ce825da332c6e857068d
The config, which has always worked for me:
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so
xdebug.cli_color=1
xdebug.remote_connect_back=1
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.ide_key=PHPSTOR
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?
Please sign in to leave a comment.
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 :(
This might be the related issue: https://youtrack.jetbrains.com/issue/WI-39452
Unfortunately, we do really need to take a look at the Xdebug remote log.
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
or
(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.