Configuring Xdebug

Xdebug is a php source code debugger. To enable it, create the file /etc/php5/mods-available/xdebug.ini, with the following contents:

[xdebug]
xdebug.remote_enable=1
xdebug.max_nesting_level=300
xdebug.remote_connect_back=1

zend_extension=xdebug.so

If I do not need Xdebug, and PHP performance matters, I do not enable it. With PHP 5.5.9 execution time of performance.php is reduced from more than 12 seconds to less than 3 seconds when xdebug is disabled. Try it yourself! To disable XDebug after it has been enabled, delete /etc/php5/mods-available/xdebug.ini and restart apache, sudo service apache2 restart.

I use the script install-xdebug.sh to install and configure Xdebug.

Leave a Reply

Your email address will not be published. Required fields are marked *