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. V3 ( xdebug.client_host) and v2 ( xdebug.In case there might be fixes for any problems you might encounter, consider updating devtools before This can be done using the following commands: fin config set -env=local 'PHP_IDE_CONFIG=serverName=$ to support both To debug PHP CLI scripts, we have to tell PHPStorm which existing server configuration to use via the
CLI Scriptsįirst, follow automatic or manual instructions to configure server and path With this manual setup you will be able to debug scripts within your project’s root ( /var/www/ on the server). Map the project directory on the host to /var/www/ on the server:
PHPStorm automatically configures a server and directory mappings between the host and the server.ĭirectory mappings are very important, as that’s how PHPStorm knows how to map sources on the server to those on Open a project in PHPStorm and set a breakpoint wherever you likeĬlick on the Start Listening for PHP Debug Connections button in PHPStormĪ debugging session will start and Xdebug will initialize a connection to PHPStorm.Ĭlick on Accept in the Incoming Connection From Xdebug dialogue in PHPStorm.PHPStorm makes debugging setup very easy using the Incoming Connection Dialog. Next, follow the IDE specific setup steps:įirst, follow the setup instructions to enable the Xdebug integration. With Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans To verify that Xdebug was enabled: $ fin exec php -v | grep -i xdebug To enable it: fin config set -env=local XDEBUG_ENABLED=1 Xdebug integration is disabled by default as it causes a major performance hit.
Xdebug can be used to debug both web requests and cli scripts (e.g., Drush commands).