25

I had a lot of trouble installing Eclipse and PDT on my system. It took two days, largely because all the tutorials I could find were out of date (written in 2008, it's 2011 now) and various steps they included were no longer necessary, broken, or irrelevant. I wanted to write my process here so it could be improved upon (via wiki) as time goes on.

  1. Install Eclipse without PHP plugin ("Eclipse Classic"). This will give you a complete Eclipse, which I find preferable, as the UI is more fleshed out (e.g. you get a default list of Perspectives, which helps you understand what Perspectives are.)

  2. Install PDT SDK with the Help > Install New Software menu item. You'd think you'd be done here, but if you try to run something, it'll fail complaining of not having a debugger.

  3. Install the Zend Debugger. It'll fail if you try to use the Install New Software option, as many tutorials suggest ("No repository found containing osgi.bundle.org.zend.php.debug.debugger.5.3.7.v20091116".) Instead, download it from http://www.zend.com/en/community/pdt, and manually copy the features/ and plugins/ directory into your Eclipse install (these instructions are not written anywhere).

  4. Restart Eclipse

  5. Monkey with preferences for a while -- if you followed a previous tutorial and tried to manually add your php executable to Eclipse prefs (/usr/bin/php), remove it (PHP > PHP Executables). Set one of the Zend Debugger executables to the default. If you've already tried to execute a .php file, remove the existing "Run" profile you (maybe weren't aware that you) created (Run > Debug Configurations...).

  6. Eclipse works! You should be able to run a .php file as a script just fine.

duozmo
  • 1,698
  • 5
  • 22
  • 33
  • 2
    I don't think your problem specific to Mac. Eclipse PDT is badly broken on Windows Vista also. There are too many disjointed components that need to be installed and it's a nightmare to find all the right versions. Right now for instance the latest version of XAMPP has PHP 5.3 but the latest Zend Debugger binary that you can find quickly through a Google search is only compatible with version 5.2. So, one approach is to pretend it's 2008 and download all the packages that were current at the time the instructions were written. I was able to get at least the PHP CLI debugger to work this way. – Alex R Apr 03 '10 at 18:12
  • @Alex: XAMPP ships with XDebug, you'll only need to enable it in the configuration (php.ini). This way, you'll pretty much get debugging to work instantly. – Christian Studer Apr 30 '10 at 11:26
  • 1
    Step 3 of your post now works. In Eclipse, add a new Software Site called PDT with the URL http://downloads.zend.com/pdt. Eclipse will download and install the Zend Debugger without any trouble. – Kyle Noland Oct 07 '10 at 17:06
  • It's 2011 now, and I must admit I'm not using Eclipse much any longer. If you try this and it still works, please update the year in the title. – duozmo Jan 01 '11 at 20:01
  • I've updated the title to 2011, as this still fixes the 'repository not found' problem when installing Zend through the update manager in Eclipse Helios. –  Jul 22 '11 at 22:38
  • Works with win7 as of 11/23. Paths are windows and not unix, but same concepts apply. – jchapa Nov 23 '11 at 18:29
  • Mostly for the benefit of those just tuning in, this video helped me a lot in getting php debugging functional on OSX: http://www.youtube.com/watch?v=E_TQBU2ZW44 – Code Poet May 03 '12 at 11:03
  • The [Eclipse repository of Zend debugger](http://downloads.zend.com/pdt/) has problem. The repository has both 'artifacts.jar' and 'artifacts.xm' files, the 'artifacts.jar' has stale already. However Eclipse prefers the 'artifacts.jar', Eclipse would fail to install latest debugger plug-ins(version 20110322). :( I have reported it to Zend. Hope it will be fixed soon. – Kane May 27 '12 at 14:03

4 Answers4

11

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

I have recently installed php development tools into eclipse by following the instructions on this wiki. Hope it helps anyone who was having issues like I was.

Andrew Chinn
  • 111
  • 1
  • 2
2

Love it. Personally I highly recommend using Eclipse 3.3 and PDT 1.3 and forgoing new versions until they get their act together. I would help out but, well, my time is limited as it is. I've found there are many issues with PDT versions since:

  • 2.0 through 2.1 had severe performance isuses
  • 2.1 seemed very rushed - lots of the prefernece
  • 2.2 seems to have issues with auto completion on constructors and the like (reading some of the developer comments in bug reports don't inspire confidence AT ALL, either)

I also recommend installing in much the same fashion as the original post recommended - get the vanilla eclipse, don't even try downloading the PDT package.

Additionally, don't ever try using the SimpleTest plugin - it's buggy and fails at least half the time on every install I've ever encountered.

Alternatively, if you work in a business environment or have money to spare, Zend Studio is basically PDT done... better.

spronkey
  • 422
  • 3
  • 10
1

One possible approach is to pretend it's 2008 and download all the packages that were current at the time the instructions were written. I was able to get at least the PHP CLI debugger to work this way, but still no luck with debugging of PHP Web pages.

I don't think your problem specific to Mac. I have Vista.

Alex R
  • 11,364
  • 15
  • 100
  • 180
1

I had no problems getting PDT and Zend Debugger CLI to run ... I can debug PHP just fine (so long as I debug as script and do not try to route to the web server) {I'm on Mac}.

I've tried the path tools, etc ... and still when I try to route to the browser - I get a server can't find page response ... note that when I "test debug" Zend responds that everything is "a-ok" - but even with that, I can't a project php file to route through the web server.

I'm thinking it's either path related, or somehow security on Mac 10.6

anyone got an idea?

Robert
  • 11
  • 1