I'm using Docker Toolbox (docker-machine) in Mac OS 10.13, and trying to use Xdebug with PHP 7.1. At first I configured the interpreter via Docker container in virtual machine:
Then I add the Server with mappings (8088 is exposed port of docker-machine):
And at last I create Debug Configuration:
Then I press "Start listening for Debug Connections" and trying to reload page in target project. And all I can see is infinite loader. If I switch off the listening page loads in 100 ms.
How I can use Xdebug with docker-machine?
Here is my Xdebug config from Dockerfile:
RUN echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_autostart=true" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_mode=req" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_log=/var/log/xdebug_remote.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.idekey=PHP_STORM" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini



xdebug.remote_log=/var/log/xdebug_remote.logline) and share it somewhere (do not copy-paste raw content here) -- it will tell where it tries to connect and what it tries to do.