- Download Eclipse for PHP developers
- I'm using the Linux 32 bit version
- Because of a bug with PDT for Eclipse Helios, I chose to go with Eclipse PDT SR2 for now.
- Install XDebug by typing:
apt-get install php5-xdebug
- Edit /etc/php5/conf.d/xdebug.ini to look something like this:
- The log line can be good to enable in case you run into troubles.
- The first line can be different depending on PHP version. Use the line that you can find in the file (which is the default for your version of Ubuntu):
sudo apache2ctl restart
- Create a PHP Project. Mine is named "RDF4SMW".
- Choose Run > Debug Configurations in Eclipse
- Turn the configuration to your web server setup. For me, it looks like this ("smw" is the folder where MediaWiki is installed):
Custom location of www folder
Then an important thing If you have changed the location of your www folder from /var/www, then don't miss this! This was what caused the problem for me, with breakpoints not taking:
- Click the "Configure" button in the Debug configuration screen seen above
- Click the "Path mapping" tab
- Configure according to the location of your www folder. My current config looks like so: