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 requirements definition, design, and development of cloud-native applications using AWS. Now, building a new prescription data collection platform at KAKEHASHI Inc. Japan AWS Top Engineers 2020-2023.