DeeEmm

Pragmatism in code

Pragmatism in code

Waxing lyrical about life the universe and everything software related since lunchtime 2006.

Eclipse PDT And Xdebug (Better Than Ultraedit?)

Unusually I have found myself with a spare half hour this morning so decided to put it to good use and write a post here. Progress has been slow of late - the only thing that has really changed is the folder layout - I've created a few new folders and moved some files from the site root - the only real use this serves is simply to tidy things up a little. There's basically two new folders - 'javascript' and 'core_files' - both of these should be self explainatary. For those of you who are interested - checkout the latest CVS - you will see a branch called 'new_folder_layout' under the dmcms_080 module - that's the new site layout.Other worthy things of note are my continued useage of eclipse - some of you may recall that late last year I switched to Linux from Windoze (Ubuntu to be exact) the transition was relatively painless but it did leave me without a linux version of my trusty Ultraedit. Rumors of a Linux port aside it looked like UEdit Studio was not going to find its way over to the dark side and so that left me with little choice than to try something else - that something else was Eclipse with the PDT plugin (which I have installed by using the Pulse Eclipse manager).For the odd file edits here and there I must admit I use the built in text editor (Gedit) which has syntax highlighting and generally suits me fine but for project based stuff (like DMCMS) I've been using Eclipse. The integrated CVS client is great - there's not even any need for a key - just put in your password once and the checkout / update process is seamless and uninterrupted. Checking out into a project is very easy - in fact a project can be created when you check the files out if you require. Overall - very easy to use. My only (very small) complaint is that the CVS commands are hidden under a second level in the context menu (Under the 'Team' menu to be precise).With an active project you might want to set up the Xdebug integrated (free) php debugger - to do so you will need to select Xdebug as the default debugger from the properties menu (accessible under windows > properties) and add in the path to your php executable. A point worthy of note here is that you may not have a php executable if you installed PHP from the repository - you might need to add the command line interface version of PHP - you can easily do this by the following command-(for ubuntu)sudo apt-get install php5-cli

Obviously replace the php5 with your version - now you should be able to find php5 under Usr/Bin (type 'find php5' in a terminal to list all occurances of php5).

The Xdebug debugger http://xdebug.org/ is an open source project that is now bundled into Eclipse, it is free and thus very obviously a fraction of the price of the Zend version. For those of you who have a license for the Zend product - Eclipse also offers support for this too

With the Xdebug debugger installed and the CVS client up and running I now have a tool of comparible use to Ultraedit Studio for PHP work -for me it's still a bit clunky but then that's probably more to do with the fact that I've been using ultraedit for many years - I'm sure I'l eventually get used to it.

Continue reading
  5419 Hits
  0 Comments
5419 Hits
0 Comments

One Week Later...

I've now been using Eclipse for the past 5 days and must admit I think I've found a serious contender for replacing Ultraedit. I've set up the CVS client plugin - which incidentally doesn't have the annoying problem found with crossvc and tortoise that requires you to input your password multiple times (I added it once and haven't needed to add it in again!!!) - the CVS client is as good as any others I've used - it integrates nicely into the main editor so you only really need to go into the plugin to set it up. Some of the terminology differs from what you might expect (instead of 'CVS' on the context menu it says 'team') but once you're used to it it really isn't a problem.

Eclipse as an editor has some nice productivity features - for instance - it searches all the code in the project and lists all instances of the text 'TODO' (and some other tags) and provides you with a task list in a window at the bottom the screen - these tasks link directly with the code in which they were found - clicking on them open the relevent file at the appropriate place. You can update / expand the text to make it more useable or readable, plus you can set priorities and mark them as finished too. What a great tool!!Code checking was one feature that I loved about using Ultraedit for writing PHP, well Eclipse not only includes code checking - it handles it in a very different way. Along side the task window you will find the 'Problems' window - this is a live list of all errors and warnings found in all files in the project - No need to syntax check each file - simple browse through the window content - again clicking on the error will take you directly to the relevent part of the code. Warnings and errors are also highlighted by a warning or error icon in the margin of the codepage.Another nifty feature that I love is the full page editing - if you double click on the tab for the page you want to edit all of the docked menus are automatically hidden and the page is shown full size within the editor - menus can still be accessed by the use of small icons around the edge of the screen. Double clicking the tab or selecting one of the restore icons returns the layout back to normal. This feature also works with any of the tabbed docked tool windows as well.I must admit however, I haven't found a column edit mode, which I use quite a lot in Ultraedit. In summary - I actually like this editor quite a lot, whether it is extensible enough to use for other non supported languages remains to be seen but as a PHP editing envoiroment it certainly cuts the mustard, I'm quite happy to adopt this as my primary PHP editor within the Linux envoironment.One thing of note is the way in which you choose to install it. I am running Ubuntu 7.10 (Gutsy) and found that if you wanted to install Eclipse via synaptics and then installl the plugin using the built in feature manager in Eclipse the PDT plugin will not install - this is because the version of Eclipse in the Gutsy repository is too old. this means that you can either manually install a later version of Eclipse, or install the PDT 'all in one'. There is also another alternative - you can use Eclipse 'Pulse' - this is an online plugin management service - it is free to use and currently in beta - Pulse provides PDT as a package as well.Anyhows...Enough talking for the moment - I actually have work to be getting on with. Currently I am working on getting the user group functionality sorted out for DMCMS - this will provide the possibility of many additional features - one of which will be user comments. (Hopefully some of you who read this might also contribute to the discussion) I just thoght I'd take the time to share my findings with Eclipse.L8RSDM.

  2859 Hits
  0 Comments
2859 Hits
0 Comments