How to Install xDebug in Ubuntu

xDebug is most famous and popular PHP extension which provides the debugging of your code very smartly. It is most important to a programmer to debugging their code/data, xDebug gives us more flexibility to debug our code.  Here I am gonna show you how to install  xDebug in your ubuntu machine.

Run this code through your terminal.
[PHP]~$ sudo apt-get install php5-xdebug[/PHP]

Then open your php.ini file and add these code in your ini file.

[PHP]
# Added for xdebug
zend_extension=”/usr/lib/php5/20100525/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
[/PHP]

Finally restart the server.
[PHP]~$ sudo service SERVER_NAME restart[/PHP]

All done! now you can enjoy your debugging.