Install Xdebug
sudo apt-get install php5-xdebug
Update xdebug.ini
Now we need to update the xdebug.ini file. Use the following command to open the file with gedit:
sudo gedit /etc/php5/apache2/conf.d/xdebug.ini
Change the file so it looks like this:
; configuration for php xdebug module
zend_extension=”/usr/lib/php5/20090626/xdebug.so”
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
Restart Apache
All left to do now is restart Apache with the following command:
sudo /etc/init.d/apache2 restart
Now you can check if all is OK with phpinfo(). You should see the following text:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans
with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH