I\'m trying to use XDebug in the following scenario
I've got the following setup and it works.
Host PC (client)
** I am aware that the OP question mentions Windows, but regarding that the main setup to solve this should be made on the VM, I hope this helps somebody anyway.
Guest PC (server) / Virtual Machine
The following steps should be made on the "Guest PC (server) / Virtual Machine"
sudo apt-get install php5-xdebug/etc/php5/apache2/php.ini,add these lines right before the [Date] AND change xdebug.remote_host to reflect your "Host PC (client)" IP:
[debug]
; Remote settings
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=192.168.0.2
xdebug.remote_port=9000
sudo service apache2 restartReference
How to configure XDebug - Remote Debuging http://wiki.netbeans.org/HowToConfigureXDebug#Remote_Debuging
you need to have correctly configured property xdebug_remote.host on remote machine. The IP address of local machine has to be defined in this property. For example, you want to debug your source code on remote machine 192.168.0.1 using Netbeans installed on 192.168.0.2. You need to change xdebug.remote_host on 192.168.0.1 to xdebug.remote_host=192.168.0.2. If doesn't work verify you have port configured in xdebug.remote_port open on both machines.