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

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’
Outout
/usr/lib/php5/20090626/xdebug.so
Command 3:
sudo gedit /etc/php5/cli/conf.d/xdebug.ini
Command 4:
There we have already :
zend_extension=/usr/lib/php5/20090626/xdebug.so
Add the below lines
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
Command 5:
sudo /etc/init.d/apache2 restart
awesome ends with your blog i really like the way you explain things in a very simple way thanks for the share 😉
Shouldn’t we edit the file in /etc/php5/mods-available/xdebug.ini instead of the one in the cli directory?
sudo apt-get install php5-xdebug
please update me if my php version is php7.0
thanks