OS Ubuntu

Install Xdebug In Ubuntu

Hi friends, here I would like to explain how to install Xdebug in ubuntu 12.04 . By following list of commands we will installing Xdebug.

What is Xdebug:

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 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
x-debug-installation-in-ubuntu by Anil Labs

Xdebug also provides:

  • profiling information for PHP scripts
  • code coverage analysis
  • capabilities to debug your scripts interactively with a debugger front-end.

Above text about Xdebug by http://en.wikipedia.org/wiki/Xdebug

List of commands

Command 1:

sudo apt-get install php5-xdebug

Command 2:

sudo find / -name ‘xdebug.so’



Command 3:

sudo gedit /etc/php5/cli/conf.d/xdebug.ini

Command 4:

There we have already :


Add the below lines






Command 5:

sudo /etc/init.d/apache2 restart

3 thoughts on “Install Xdebug In Ubuntu”

  1. Shouldn’t we edit the file in /etc/php5/mods-available/xdebug.ini instead of the one in the cli directory?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.