I managed to get xdebug in combination with docker and phpstorm. For http calls ... IE
http://192.168.99.100:8081/?XDEBUG_SESSION_START=PHPSTORM
But when I try to run phpunit tests, it does not connect to phpstorm
I did the directory mapping correctly in phpstorm and also did the following on my docker instance export XDEBUG_CONFIG="idekey=PHPSTORM"
I also tried on my docker: export PHP_IDE_CONFIG = 'serverName = web.docker'and named the server configuration on phpstorm web.docker. still working on http but not CLI
Can I get phpstorm and xdebug to work together for the command line?
here is my file: /etc/php5/cli/conf.d/20-xdebug.ini
zend_extension=xdebug.so xdebug.remote_enable=1 xdebug.idekey=PHPSTORM xdebug.remote_connect_back=1 xdebug.remote_host=172.17.42.1 dxdebug.remote_autostart=1
When I turn on logging and play with the xdebug_remote_host IP address, I get
W: Remote address not found, connecting to configured address/port: localhost:9000. :-| E: Could not connect to client. :-( Log closed at 2015-10-13 12:20:39 Log opened at 2015-10-13 12:22:58 I: Checking remote connect back address. W: Remote address not found, connecting to configured address/port: 172.17.42.1:9000. :-| E: Could not connect to client. :-( Log closed at 2015-10-13 12:22:58 Log opened at 2015-10-13 12:23:58 I: Checking remote connect back address. W: Remote address not found, connecting to configured address/port: 192.168.99.100:9000. :-| E: Could not connect to client. :-( Log closed at 2015-10-13 12:23:58
Solution (change) Turning on xdebug logging, I saw that it successfully connects to 192.168.99.1 , so this solved the problem
xdebug.remote_host=192.168.99.1
source share