docker-mac-vagrant
docker-mac-vagrant copied to clipboard
how to catch Xdebug connections?
Hi! Thanks for this repository, it really makes my Mac breathe freely)
Have you ideas, how to catch debug connection in my IDE (phpstorm)?
Hey Kirill,
While I havent used PHP in the past few months, I see no reason why it wouldn't work the same it normally does. Just forward the adequate ports to the host, and connect to it via PHPStorm.
For reference here are the settings I had used when I last did it:
# Install XDebug (Optional)
ARG XDEBUG_ACTIVE=0
RUN if [ "$XDEBUG_ACTIVE" -eq 1 ] ; then \
yes | pecl install xdebug \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_autostart=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.idekey=MYPROJECT-DEBUG" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
; fi