

These mappings are used to match paths from inside the Docker container to the paths One for the docroot ( build/html) and the other for the srcĭirectory so that breakpoints can be set in the custom modules in the src directory as well. The example shown here is using the Grunt Drupal Tasks Give your server a name and input the host.īe sure to add the docroot mappings. For the DBGp Proxy, just ensure that the port is the same.Ĭreate a new Server by clicking on the "+" button. For PHP 5.6 check /etc/opt/rh/rh-php56/php.d/15-xdebug.ini. If using docker-compose with your Apache container named * www, you can more simply run:ĭocker-compose exec This path varies by PHP version. With the container name (found via docker ps), try running:ĭocker exec /usr/bin/env cat /etc/opt/remi/php70/php.d/15-xdebug.ini

You can view your Xdebug configuration by looking inside the Apache container. Make sure you have the correct version of PHP selected: You can also get to the project settings by going to: PHPStorm > Preferences (OSX) or File > Settings (Windows, Linux). To get started configuring your PHPStorm IDE open the application settings. Will load the PHP Xdebug extension with the default configuration.įor details of the Xdebug configuration of Phase2's Apache PHP containers, check out the apache-php-base DockerHub page. In your docker command or your docker-compose.yml manifest, ensure the environment variable PHP_XDEBUG="true". Activate Xdebug for your running Drupal site Check out the Routine Image Maintenance Setup Steps 1. If you haven't updated your Docker Images in awhile, doing so now is a good precautionary step that you have everything Once done, run devtools doctor to confirm devtools is in a healthy. Just one more thing, on all of you curios how I debug xdebug is with simple phpinfo().In case there might be fixes for any problems you might encounter, consider updating devtools before In the PHPStorm small changes were required the server needed to be renamed to jo and the mappings to /var/you need to rebuild it with this: docker-compose up -build In the end, I went straight to docker-compose.yml and changed this: fpm:
#Phpstorm docker xdebug install#
Take a note at the _ Install Xdebug_ section.

& echo "xdebug.remote_connect_back=1" > /usr/local/etc/php/conf.d/xdebug.ini \ & echo "xdebug.remote_port=9000" > /usr/local/etc/php/conf.d/xdebug.ini \ & echo "xdebug.idekey=PHPSTORM" > /usr/local/etc/php/conf.d/xdebug.ini \ & echo "xdebug.remote_autostart=off" > /usr/local/etc/php/conf.d/xdebug.ini \ & echo "xdebug.remote_enable=on" > /usr/local/etc/php/conf.d/xdebug.ini \ & echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ Mv composer.phar /usr/local/bin/composer & \ with-freetype-dir=/usr/include/freetype2 \
#Phpstorm docker xdebug update#
RUN apt-get update & apt-get install -y libfreetype6-dev libjpeg-dev libpng-dev libfontconfig1 libxrender1 git libmcrypt-dev zip mysql-client & \ #RUN printf "deb jessie main\ndeb-src jessie main\ndeb jessie/updates main\ndeb-src jessie/updates main" > /etc/apt/sources.list # Set to keep file permissions same as host for mounted volume I started changing files fpm.docker: FROM php:7.1.18-fpm Real example on my computer: /var/www/html/jobsoutsource (dev) $ docker-compose exec fpm hostname -I To get the IP I used this syntax: docker-composer exec hostname -I I just want to help out a bit how I managed to set it up with my client's docker.
