Categories
Code Area PHP Programming

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.

Categories
Apache Tools and Technologies

How to Configure xDebug in XAMPP or Apache

xDebug is Extremely useful and popular tools for debugging error for PHP programmers.It’s really great debugger for PHP programming. Actually it’s working with Apache. To install or configure xDebug follow some simple steps given below.

Step 1: Open your php.ini file

Step 2 : Find xDebug and then you can see,

;zend_extension = "C:xamppphpextphp_eaccelerator_ts.dll"

Just delete (;) from that line.

Step 3: Then cope the following line and paste it into php.ini file

xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

 Step 4 : Finally restart Apache. Now you can find your error very smartly and easily.