HOWTO.xdebug - raynaldmo/HOWTO GitHub Wiki
Xdebug is a PHP extension which provides debugging and profiling capabilities. It uses the DBGp debugging protocol.
The debug information that Xdebug can provide includes the following:
stack and function traces in error messages[2] 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[3] code coverage analysis capabilities to debug your scripts interactively with a debugger front-end.
Install on Ubuntu server
Reference
http://wylbur.us/2014-06-17-add-xdebug-to-ubuntu-1404
sudo apt-get install php5-xdebug
Update /etc/php5/apache2/php.ini
Added for xdebug
zend_extension="/usr/lib/php5/20121212/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.max_nesting_level=300
Install on CentOS server
yum install php-devel
yum install php-pear
yum install gcc gcc-c++ autoconf automake
pecl install xdebug-2.2.7 (for php 5.3.x)
Update /etc/php.ini
[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1