This article helps installing Eclipse 3.1 and
the PHPEclipse plugin on a Debian Sarge install. This means
installing the basic software, installing the PHP plugin into
it, creating a new project and testing the debug functions.
There is no (official) package for Eclipse 3.1 on Debian Sarge,
so this install procedure is based on the binary software
available for Linux x86 here.
Download the software and uncompress it (it uncompresses in a
directory named eclipse, so you can uncompress it wherever you
want to) and move into the eclipse directory.
$ tar zxvc eclipse-SDK-3.1.1-linux-gtk.tar.gz
$ cd eclipse
Quick start Eclipse by launching the eclipse executable
Decide which directory will be your workspace. The workspace
directory is where Eclipse files are kept, not where your source
files are kept, so don't use the sources directory as this will
conflict with projects you might create later.
Select "Workbench" (unless you want to learn more about
anything) in the intro screen.
You are now inside the IDE.
To get an open-source free sofware PHP plugin, go to the
SourceForge page for the plugin and download the plugin for
Eclipse 3.1 stream (not official by the time of writing).
Once downloaded, unzip the file in the newly-created eclipse
directory, they should be written into the plugins and features
$ unzip phpeclipse-1.1.6-unofficial.zip
Now start Eclipse again
use File > Import > External Features
select the location (normally the Eclipse directory) and click
click "Select All"
Then import plugins in the same way
use File > Import > External Plug-ins and Fragments
Click "Add All" (or only select the ones coming from sourceforge
if you want to restrict to the minimum)
Create a PHP Project
use File > New > Project...
select "PHP Project" and click "Next"
give a project name
uncheck the box (if your source code directory already exists)
and enter the path to your sources for this project
You now have a new project appearing in your left navigation
Setting up PHP interpreter
the plugin expects to find the PHP interpreter as /apache/php/php.
You don't want that as on a Debian machine, it is located at /usr/bin/php
(or php4). To change it, use the Run > Debug menu
Click on "PHP Application"
Give a name ("My interpreter"?)
Select the file you want to debug in this case (just select one
PHP file from your new project)
Select the "Environment" tab
Select the "Interpreter" tab
Browse to select /usr/bin/php4
That's it, you have debugged your first PHP script with Eclipse.