Dashboard > Development > Debugging PHP with Xdebug
Development Log In   View a printable version of the current page.
Debugging PHP with Xdebug
Added by Brandon Philips, last edited by Brandon Philips on Feb 27, 2004  (view change)
Labels: 
(None)

Well sometimes something is better than nothing, : - ).
Xdebug is a pretty neat piece of software that was relatively easy to setup.

Installation

grab the xdebug.so at the bottom of the page and place it in /usr/lib/php4/20020429
edit /etc/php4/apache/php.ini and add this at the bottom

zend_extension="/usr/lib/php4/20020429/xdebug.so"
xdebug.manual_url=http://php.oregonstate.edu
xdebug.remote_enable=On
xdebug.remote_handler="gdb"
xdebug.remote_host="localhost"

restart apache
sudo /etc/init.d/apache/restart

Use

grab the debugclient at the bottom of the page and put it somewhere handy to execute
load up a php script
set a breakpoint, ex break index.php:22
type run
type help for some additional features
enjoy.

Notes

xdebug can be found at http://xdebug.org
also xdebug has some profiling and stack dump features that a pretty darn cool http://xdebug.org/docs.php

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.7 Build:#524 Jul 28, 2006) - Bug/feature request - Contact Administrators