Making work XDebug with PHPStorm and a Vagrant Box (Ubuntu 14.04 Server)

Everything was working fine except for the XDebug with PHPStorm so in order to fix that you need to run the following steps:

This commands are executed on our virtual machine.

Open the containing folder, in my case ~/workspace/vagrant
vagrant up
vagrant ssh

1. Make sure that you have installed php xdebug in the VagrantBox
sudo apt-get install php5-xdebug

2. Enable that module
sudo php5enmod xdebug

3. Change the default configurations of the module with a text editor, in my case it’s Vim
sudo vim /etc/php5/mods-available/xdebug.ini

4. Add the following lines to the file and save it.

5. Restart the apache server and exit the vagrantbox
sudo service apache2 restart

Now in our PHPStorm let’s configure it our PHPDebug configuration.

Create a new “Run/Debug Web Application” configuration and with our server just give the host and map your project paths to the absolute route in the server and that’s all.

A more explicit post about it in


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s