The short answer is Eclipse with the PHP Eclipse plug-in. The long answer is along the lines of "good luck getting it to work". I have personally spent a lot of time on this and had planned to report my "success story" in these forums somewhere but just haven't had time. In a nutshell, what I've got working on Ubuntu is:
- Eclipse Europa 3.3.1
- XDebug (latest)
- Sun Java JVM v5
- PHP Eclipse (latest nightly build always seems ok)
- Latest Apache webserver
- MySQL 5
- PHP 5
I've got some great links for installing XDebug, Apache, etc., but am not at the Ubuntu machine right now. I will make a point to post the entire sequence here tonight. But to answer your question, the above configuration is what I use and I believe what the Joomla! Coding 101 community is recommending until J!Code (a branded packaging of EasyEclipse) is ready for prime time. I have tried using the latest versions of everything but never got things working. I was guided by several people in the know about trying to go with the latest versions of such things, so when I found a combination that worked, I just stuck with it.
There is
an entry in the developer Wiki that has details on how to make things work in both Windows and Linux using XAMPP, but I had mixed success with the Linux approach (the Windows approach works fine). I have heard from several people regarding the Linux setup, and I have made modifications to the wiki to correct errors based on that feedback. It should work fine for you if you don't mind using XAMPP, which you will not be able to do if you've already installed Apache or MySQL daemons.
Eclipse with XDebug has both local and remote debugging options, and each has its benefits. Local debugging does not rely on Apache, whereas remote debugging does. Remote debugging allows you to see your page being rendered in some cases, whereas local debugging shows you the HTML being output by the code (in the Eclipse console window). I switch between the two depending on the stage of development of a particular piece of code.
That's all I have time to type right now. I'll make a point of posting the links I've used with repeated success tonight.
Expect there to be quite a bit of interest in this thread!
Have fun!
Bruce
EDIT:
Okay, here are the links I use to get things setup in Ubuntu.
1. Install LAMP and test that XDebug works (follow exactly) -
http://www.apaddedcell.com/easy-php-debugging-ubuntu-using-xdebug-and-vim2. Download and install Eclipse Europa 3.3.1.1 -
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.3.1.1-200710231652/eclipse-SDK-3.3.1.1-linux-gtk.tar.gz3. Download and install Sun Java JVM 1.5 and select it as the default JVM
Code: Select all
sudo apt-get install sun-java5-jdk
sudo update-alternatives --config java
4. Setup a menu launcher -
Code: Select all
sudoedit /usr/share/applications/eclipse.desktop
With this contents (change paths to eclipse elements to match your system):
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
5. Launch Eclipse and install the latest PHP Eclipse nightly build. This is a brief summary of information from the PHP Eclipse help info that comes with the plugin.
- Select Software Updates and click Find and Install
- When that option is selected, a window will appear providing two options. Select 'Search for new features to install'.
- In order to install PHPEclipse, you must tell Eclipse where to find it. On the top right of the window that appears, there will be a button labeled 'New Remote Site...'. When you click on this button, a window will appear requesting the Name and URL of the site to be added. Enter 'PHPEclipse Nightly Builds' in the Name field and
http://update.phpeclipse.net/update/nightly/ in the URL field.
- Follow your intuition through the sequence of dialogs, making sure to keep focused only on installing the PHP Eclipse Nightly Build.
6. Setup remote debugging (start where ian_mac joins the following IRC chat) -
http://echelog.matzon.dk/logs/browse/phpeclipse/1186783200If I left anything out, try reading the link I posted in this original entry that is in the Joomla Developer Wiki area. And please offer any corrections you see are needed.