Saturday, November 1, 2008

KB: XAMPP XDebug Install on Ubuntu

Install XDebug for use with XAMPP on Ubuntu Linux.



This article assumes that you already have XAMPP installed on your system.

Build Environment Setup

XDebug will need to be compiled. A couple of prerequisites need to be in place before you can build the source.

1. Install the build-essential package to setup a basic build environment:
sudo apt-get update
sudo apt-get install build-essential
2. Download the development archive for your version of XAMPP and extract it over your existing installation (you may want to backup your XAMPP directory first):
sudo tar xvfz xampp-linux-devel-1.6.8a.tar.gz -C /opt

Build XDebug

1. Download a copy of the XDebug source here and extract the archive to any location in your home directory:
tar xvfz xdebug-2.0.3.tgz -C /home/krdavis/srcs
2. Run phpize on the source:
cd /home/krdavis/srcs/xdebug-2.0.3
3. Configure and build XDebug. When configuring XDebug, you may get an error if a required dependency is missing. In this case, just install the missing dependency and reconfigure XDebug:
./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config

Install XDebug to XAMPP

1. Copy the XDebug library to the XAMPP PHP extensions directory:
sudo cp modules/ /opt/lampp/lib/php/extensions
2. Edit /opt/lampp/etc/php.ini and after the "Paths and Directories" section add:
; Paths and Directories ;


; Debugging ;

zend_extension = /opt/lampp/lib/php/extensions/
xdebug.remote_enable = 1
3. Restart XAMPP and navigate to http://localhost/xampp/phpinfo.php and check for the xdebug module:
PHPInfo - XDebug
To Top