Setting up XDebug to Debug PHP Applications

The following are general instructions as to how to set up XDebug and should work for most any environment you may be using whether it is Apache or IIS. You will want to make sure before continuing that you have a web server installed and running on which to do your PHP debugging using XDebug.

First you will need to download the latest version of XDebug from for the type of system your web server is running on.

Next place the XDebug binary you just downloaded into your PHP extensions directory depending on where you installed PHP for example C:PHPext.

Now you will need to open your php.ini file in your favorite text editor and add the following lines to the end of the file. These setting will later on help you in setting up tools such as Eclipse to work properly with XDebug on this server.

zend_extension = C:PHPextphp_xdebug-<replace with correct version>.dll

Restart your web server or PHP process to allow for these changes to take place and check your phpinfo() output to make sure XDebug set up properly.

Facebook Comments