I already had PHP 5.3.2, Apache 2.0 and mySQL running on the VM.
I installed XDebug using:
apt-get install php5-xdebug
This added a file named: "/usr/lib/php5/20090626+lfs/xdebug.so"
I then went in to /etc/php5/apache2/php.ini and added the following lines to the bottom:
Another time, I used this:
I also checked there was no zend lines referring to zend debuggers etc, which conflict.
The IP I used above was not the IP of the VM as reported when using ifconfig on the VM, it was instead the IP of my host machine (my mac):
ifconfig on my mac:
I added a file phpinfo.php with to see the xdebug settings:
I now needed to set up PHPStorm to use this configuration:
Under: Run > Edit Configurations in PHPStorm:
Clicking on Server path mappings:
Above, I made sure to use the mount point that the VM was using - this was configured using Parallels > Virtual Machine > Configure > Shared Folders options tab previously when setting up my VM.
I had mapped the /media/psf/
Here is the server configuration
and the mappings tab:
I made sure my VM Apache was restarted:
Now to debug, I could click the Run > Debug option in PHPStorm.
I hope this helps someone. Any questions, please email nathan [ at ] eit dot co dot nz.