I recently configured xdebug with netbeans in ubuntu .
Below are the following steps to install and configure xdebug using netbeans
1) Go to this page and install the Firefox plugin:
https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/
2) Install xdebug using command from command line (terminal)
sudo apt-get install php5-xdebug
3), then open xdebug.ini from the terminal:
gedit /etc/php5/conf.d/xdebug.ini
4) Copy only one line. (it should look like this:
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so).
5) open the php.ini file with superuser privileges using this command
sudo gedit /etc/php5/apache2/php.ini
6) paste the line that you copied from xdebug.ini , as well as the following four lines into the php.ini :
paste the copied string here
xdebug.remote_enable=On; xdebug.remote_host="localhost;" xdebug.remote_port=9000; xdebug.remote_handler="dbgp";
7) It is done !!! just need to restart apache:
use the following command to do this:
sudo /etc/init.d/apache2 restart
Now just open the project in netbeans and press ctrl+F5 or click debug>debug project from the menu.
Hope this helps you.