Is Eclipse treating you badly, learn how to debug it!

I had an issue that was resolved in a strange way and I thought I would share it. I compile Eclipse update sites using the Eclipse IDE and the builder. I usually just delete the features and plugins directory of the site and do a Build All from the site manifest. Well, all of the sudden the site builder stopped generating the site and not to mention there were no errors. The builder progress just quickly disappeared – very frustrating.

I attempted a few basic things like clean all of the projects and nothing seemed to work. So I went into debug mode…

I set the command line to launch Eclipse to this:

D:Eclipsee-35eclipseeclipse.exe -debug -console -clean

This launched the console and put the client into debug mode. Unfortunately you don’t see much action because you need to enable some debugging on a few key plugins. You can reference this recently published article for how to enable this or you can just download this .options file and place it in your Eclipse directory – where eclipse.exe resides.

So what did I find? Well, one clue was this:

Wed May 18 19:58:41 EDT 2011 - [Worker-5] Invoking (INCREMENTAL_BUILD) on builder: FacetedProjectValidationBuilder(
Wed May 18 19:58:41 EDT 2011 - [Worker-5] Builder finished: FacetedProjectValidationBuilder( time: 2ms
Wed May 18 19:58:41 EDT 2011 - [Worker-5] Checking if need to build. Starting delta computation between: ElementTree(27) and ElementTree(32)
Wed May 18 19:58:41 EDT 2011 - [Worker-5] End delta computation. (1ms).
Wed May 18 19:58:41 EDT 2011 - [Worker-5] UpdateSiteBuilder( needs building because of changes in: org.openntf.attachmentviewe

It stated the site project needed rebuilding. So I am not sure if this directly pointed to the problem but what I did notice was the two files: artifacts.jar and contents.jar were still in the directory. I deleted those files, re-ran the build and viola – everything worked great. This seems like a problem in the site builder code, where when you do a clean it should really remove these jars – not sure about that yet.

This debug process works for any Eclipse RCP based application. You can essentially get the debug options for any plugin and put them in that one .options file to find out what’s going on.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.