Xdebug restored on Lucid for Netbeans

[Update for Ubuntu 14.10 and Netbeans 7.4

php.ini was in /etc/php5/mods-available/

Needed the following:

zend_extension = "/usr/lib/php5/20121212+lfs/xdebug.so"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

]

When I upgraded from Netbeans 6.7 to 6.8 I lost the ability to debug line by line. Later, I upgraded to 6.9 in the hope that this would fix it. It didn’t but the Netbeans error message for xdebug gave me a better steer towards useful resources. My system is Ubuntu Lucid (10.04) so I looked at http://wiki.netbeans.org/HowToConfigureXDebug#How_to_on_Linux. The answer for me was to edit a line in an xdebug file (I had previously added recommended lines * to php.ini to no avail – at least, not in isolation).

cd /etc/php5/conf.d

sudo gedit xdebug.ini

The first line of xdebug.ini was _almost_ correct 😉

Because I was using PHP 5.3 the key was zend_extension rather than zend_extension_ts. That part was right. But the path was not quite correct. Instead of:


zend_extension=/usr/lib/php5/2006 ... +lfs/xdebug.so

it needed to be (in my case):

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

[Update – now /usr/lib/php5/20121212+lfs/xdebug.so]

Make sure the path actually exists and hasn’t become orphaned during an upgrade.

I then stopped and started apache and restarted Netbeans to be safe.

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 start

—–

* Here are the lines you will probably already have added:

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

1 thought on “Xdebug restored on Lucid for Netbeans

  1. Pingback: pssst … » Upgrading to Ubuntu Oneiric

Comments are closed.