Getting XDebug to work with PHP and Eclipse

I’m used to .net, so when I started coding in PHP, I really missed the remote debugging features that come with Visual Studio (being able to step through a web application). I was also looking for a good, free IDE.  I found the answers in eclipse and xdebug.  If your’e looking for the same thing, here are some starters:

Here are the steps to follow:

1. Download XAMPP or install and configure Apache, PHP, MySql.

Xampp is one package that installs and configures apache, php and mysql.  Very easy to set up a development environment.  Just download and run the exe specific to your  environment.

2. Download Eclipse Classic
http://www.eclipse.org/downloads/
Eclipse is an IDE (i.e. code editor on steroids).  Download and install it.  Open Eclipse.  When it asks, make your workspace the xampp directory (i.e. c:\xamp\htdocs\mysite)

3. Download PDT by following these instructions

http://wiki.eclipse.org/PDT/Installation

4. Download the xdebug dll
http://www.xdebug.org/download.php
Follow the instructions here: http://www.xdebug.org/docs/install.  The difficult thing for me was finding the right version to install and making sure that the entries in the php.ini were correct.  To test whether the correct version is installed, create a page with phpinfo.  If there’s an xdebug section, you’re good to go.

5. Instructions on putting it all together:
http://devzone.zend.com/article/2930

I hope this helps someone else.  I spent a good afternoon trying to piece all of this together.  Once you’ve gone through these steps

Leave a Comment