Eclipse: No entries available when choosing PHP file for debugging

I have Eclipse Juno installed. I created a PHP project for a new application I’m working on (you’ll hear more about this project in the next weeks), imported the code. Then I wanted to debug it. But run into a few problems…

First I couldn’t create a “PHP Web Application” debug configuration because of the following error:

 No tab group defined for launch configuration type org.eclipse.php.debug.core.launching.webPageLaunch

After spending some time on Google I found out it is because Eclipse Juno comes with an older version of PDT and I needed to install 3.1.1 or newer. Some how it also took me a while to find out that the right update site was http://download.eclipse.org/tools/pdt/updates/3.2/release/. Well everybody is allowed to have a slow brain once in a while…

While installing got another error with some missing dependencies… The PDT Core Unit Tests was missing bundle org.eclipse.dltk.core.tests 0.0.0. The package name ending with 0.0.0 doesn’t seem right but it was solved by just installing PDT and not the Unit Tests package. I wasn’t really planning to use this package but it’s always nice to know I couldn’t even if I wanted to :-).

Then I checked the debug configuration again. Now I was able to create a PHP Web Application debug configuration but when I clicked on Browse to select the file to debug, I just got a disabled UI saying that no files were available. Searching in Google confirmed that I’m not the only one with the problem but I didn’t find a documented solution except some hints that it might mean that I didn’t have a PHP project. But I actually did have one (had the nice PHP icon next to my project name in the project explorer). Since googling wasn’t looking very promising, I started looking all context menu entries when right clicking on the project. And I found a menu entry:

Configure > Add PHP Support...

Well it actually didn’t make much sense to me. Why would I need to add PHP support to a PHP project. If anything should already have PHP support, it should be a PHP project. But I didn’t have any other lead so I just did it. It updated the project file. And there it was, I was then able to select a PHP file to debug !!

Summary:

  • Update the PDT installation in Eclipse to the newest one
  • Only install the PDT package and not the PDT Core Unit Tests package
  • Add PHP support to your PHP project

One thought on “Eclipse: No entries available when choosing PHP file for debugging

Leave a Reply

Your email address will not be published. Required fields are marked *