Andy@

Feb / 24 / 2009

Install XDebug

Finally getting around to properly looking into XDebug and PHP debugging in a structured way… with that in mind, here is a very short How-To install.

sudo pecl install xdebug

There now … that was easy!

Ok so there’s a little more; assuming you installed php using MacPorts, you will need to edit this file:-

/opt/local/etc/php.ini

and add the following lines:-

[xdebug]
zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/var/log/xdebug/

I created a folder at /var/log/xdebug/ to take the output of the xdebug profiler

Finally, restart apache.

Page 1 of 1