PhpStorm Configuration to Debug CakePHP Console App in Vagrant

PhpStorm Configuration to Debug CakePHP Console App in Vagrant

Takahiro Iwasa
(岩佐 孝浩)
Takahiro Iwasa (岩佐 孝浩)
1 min read
CakePHP PhpStorm

PhpStorm can debug CakePHP console applications running in Vagrant.

Server-side Configuration

Add the configuration below to php.ini.

[XDebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_host = "192.168.56.1"
xdebug.idekey = "IDE_KEY"
xdebug.remote_autostart=true

If you do not want to use the IP address in the PhpStorm server setting, please export PHP_IDE_CONFIG environment variable.

export PHP_IDE_CONFIG="serverName=192.168.56.1"

PhpStorm Configuration

Navigate to File > Settings > Languages & Frameworks > PHP > Servers and update the server name to match the value specified by xdebug.remote_host. If you prefer not to configure the IP address, please add PHP_IDE_CONFIG environment variable.

Takahiro Iwasa
(岩佐 孝浩)

Takahiro Iwasa (岩佐 孝浩)

Software Developer at KAKEHASHI Inc.
Involved in the design, development, and operation of the prescription data collection platform