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.

# Added for xdebug
xdebug.remote_handler=dbgp xdebug.remote_mode=req
xdebug.remote_host= xdebug.remote_port=9000

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

All done! now you can enjoy your debugging.