The Xdebug extension helps you debugging your script by providing a lot of valuable debug information. The debug information that Xdebug can provide includes the following:
- stack traces and function traces in error messages with:
- full parameter display for user defined functions
- function name, file name and line indications
- support for member functions
- memory allocation
- protection for infinite recursions
Xdebug also provides:
- profiling information for PHP scripts
- code coverage analysis
- capabilities to debug your scripts interactively with a debug client
PECL Installation
As of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some UNIX.
Installing with PEAR/PECL is as easy as:
# pecl install xdebug
but you still need to add the correct line to your php.ini: (don’t forget to change the path and filename to the correct one — but make sure you use the full path)
zend_extension="/usr/local/php/modules/xdebug.so"Xdebug is incompatible with the Zend Optimizer and Zend Studio Debugger extensions. If these extensions are enabled in php.ini, they will not be imported into the copy created by Komodo for debugging. When configuring Remote PHP Debugging, these extensions should be manually commented out in php.ini.