$ sudo yum groupinstall 'Development Tools'then I installed php-devel which would give me phpize (which is required by pecl when installing xdebug)
$ sudo yum install php-develNow I was ready to install xdebug:
$ sudo pecl install xdebugOnce that was done, I updated php.ini file to enable xdebug. Find the xdebug section in php.ini file, if no, create one section for it under /etc/php.ini
[debug] zend_extension=/usr/lib64/php/modules/xdebug.so xdebug.remote_enable = On xdebug.remote_host = 10.0.2.15 xdebug.remote_port = 9000 xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_connect_back = On xdebug.idekey = "netbeans-xdebug" xdebug.remote_log = /tmp/xdebug.logYou will need to find the path to xdebug.so file by running:
find / -name xdebug.soYours might be different from mine. Now I was ready to enable xdebug in Netbeans, which was running on the host machine (Windows 7 in my case). Under Tools > Options > PHP > Debugging:
Debugger Port: 9000 Session ID: netbeans-xdebugUnder Project Properties (right click on project root in the Project window) > Run Configuration: Run as: Local Web Site (running on local web server) Project URL: http://localhost:8080/ Index file: index.php (I have setup port forwarding from 8080 on my localhost to port 80 on my virtual machine) Under Project Properties > Run Configuration > Advanced Debug URL: Default: http://localhost:8080/index.php Path Mapping: Server Path: /path/to/project/in/guest Project Path: /path/to/project/in/host/ That’s it, now I am able to start setting break points and press Ctrl + F5 to start debugging in Netbeans over the virtual machine.