Xdebug is in Official Ubuntu Repository
When you install a package by using compiling methods it is too difficult. You should have sound knowledge in computing.
Ubuntu is not such difficult. In windows, when you right click on .exe file and select Run, you can install a application easily. Likewise in Ubuntu the equivalent for the .exe are .deb. If you right click a .deb file and select Open with Software Center, you can install the Software easily.
In Ubuntu, you don't need to find applications (.deb) files everywhere in internet. Most of the trusted Freely available applications are in a "Pool" called Ubuntu Official Repository". When you request for install needed software, Ubuntu will download and install automatically ( If that software is in that pool). You need to do this request From the application Software Center. You have to open the application and search in it's search bar for the needed Software, select it and click on Install( Software Center has a copy of the "pool". So it knows available applications).
Other method to request for the needed applications to be install is run a command in Terminal. Command is
sudo apt-get install [PACKAGE1] ]PACKAGE2] ...
This will download the requested packages (.deb files) from the pool and install by itself. So it is so easy to install Applications in Ubuntu.
Xdebug is in the "Pool" or the Official Ubuntu Repository. You have to install following packages to get it.
php5-xdebug debhelper php5-dev binutils dh-apparmor dpkg dpkg-dev file html2text man-db perl po-debconf dh-make autoconf automake libssl-dev libtool php5-common shtool ucf libc6 php5-cli
So to install them, you need to enter the command :
sudo apt-get install php5-xdebug debhelper php5-dev binutils dh-apparmor dpkg dpkg-dev file html2text man-db perl po-debconf dh-make autoconf automake libssl-dev libtool php5-common shtool ucf libc6 php5-cli
Or you can Open the software Center and search and select each package and click on install.
But use the command is so easy. You just need to right click and Copy this command and then right click on terminal prompt and Paste. Then press Enter.
To configure Xdebug to work with php5 you need to do the followings:
In Terminal run:
gksudo gedit /etc/php/apache2/php.ini
In the resulting empty document add following lines: *
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
Save and Close the file.
Then run:
sudo /etc/init.d/apache2 restart
- This is only for Ubuntu 13.10. For 13.04
zend_extension= line should be zend_extension="/usr/lib/php5/20100525/xdebug.so". For 12.10 zend_extension="/usr/lib/php5/20100525/xdebug.so" and for 12.04 zend_extension="/usr/lib/php5/20090626/xdebug.so".