Configure Xdebug

After provisioning the environment will have the XDEBUG_CONFIG="idekey=PHPSTORM" and PHP_IDE_CONFIG="serverName=PROJECT_HOSTNAME" variables set in /etc/environment.

The PHPSTORM can be changed in the configuration.

The PROJECT_HOSTNAME will be equal to the result returned by hostname -f.

Therefore, you’re in a couple of steps of completing the setup.

Configure PhpStorm

The “dump” of environment for PHP 7.1 will look similar to the screenshot.

CIKit Xdebug

Consider pfqaplatform as the name of a project and pfqaplatform.loc as its hostname.

Configure server

The name of a server must be equal to the serverName= that is stored in PHP_IDE_CONFIG environment variable.

CIKit Xdebug

Configure for WEB

The name of a configuration could be arbitrary.

CIKit Xdebug

Configure for CLI

The value of IDE key(session id) must be equal to the idekey= that is stored in XDEBUG_CONFIG environment variable.

CIKit Xdebug

All done, use the configuration.

CIKit Xdebug