This question is about getting XDebug working in PHPStorm, when the project is running inside a local virtual machine which uses Vagrant. I haven't found any comprehensive manual how to get this running so far. Applies to PHPStorm 7.0.
The things I would like to have covered in the answer:
- How should the XDebug configuration be set inside the VM? (xdebug.ini)
- Is there a need to enable any additional ports in Vagrantfile?
- How should the 'server' be set in PHPStorm?
- How should the file mapping be set, when local files are synced with NFS into the Vagrant VM? Is there a need to set file mapping at all?
- When tryng to 'validate remote environment', which of 'FTP', 'in place' or 'mounted folder' options should be picked?
- Is it necessary to install an extension to the web browser?
I hope this might be useful as a definitive guide to get XDebug running with PHPStorm in Vagrant.