install php xdebug

I installed it for the latest stable version of php 5.3 (5.3.21). Feel free to change the version to your own needs

# download the latest stable version from http://pecl.php.net/package/xdebug
wget http://pecl.php.net/get/xdebug-2.2.1.tgz

# unarchive
tar -xf xdebug-2.2.1.tgz
cd xdebug-2.2.1

# configure
export PHP_PREFIX="/usr/local/php-5.3.21"
$PHP_PREFIX/bin/phpize
./configure --with-php-config=$PHP_PREFIX/bin/php-config

# compile
make

# install
make install

Last step is to include the extension in your php.ini along with the configuration variables you need. For me it was:


zend_extension_ts=/usr/local/php-5.3.21/lib/php/extensions/no-debug-non-zts-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

xdebug.collect_return = on
xdebug.collect_vars = on

IMPORTANT NOTE: please uncomment (if it’s not already) the following line in php.ini

report_zend_debug = 0