Easton's stuff Geek, coding and other madness....

Using Xdebug with NetBeans 7

There comes a time where it's unacceptable or inconvenient to stash var_dump() into your code. And then there's Xdebug. Xdebug makes it easy to debug your PHP application and with the intergration of NetBeans, it's even easier.

For the record, I'm using Debian 6.0.4 on my workstation and Debian Wheezy/Sid on my dev server.

First of all, lets install Xdebug on the server:

pecl install xdebug

Open up your xdebug.ini file, mine is located at /etc/php5/cgi/conf.d/xdebug.ini, and enable Xdebug. My xdebug.ini looks like this:
zend_extension=/usr/lib/php5/20100525+lfs/xdebug.so

xdebug.remote_enable=1

xdebug.remote_connect_back=1

xdebug.remote_handler=dbgp

xdebug.remote_mode=req

xdebug.remote_port=9000

xdebug.idekey=netbeans-xdebug

Subscribe to xdebug