[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: How do I debug plugin class loading problem
|
Elson,
A couple things: First, you should also check the .log file in the metadata
dir (i.e., <eclipse-install>/.metadata/.log). This will likely contain a
stack trace which will point you to the exact problem.
If you have/want to go down the debug options trail, the best approach is to
copy the .options file from the plugin called
"com.ibm.eclipse.core.runtime". The file is provided there as a template
for the various debug options supplied by the Runtime plugin. You will find
similar files in other plugins if they support debug options (I think the
Workbench plugin has one). Anyway, copy the file to be a sibling of the
"plugins" directory. Then run with -debug as you outlined. You will get a
massive amount of data on the console. (Note: the amount/content of the
data can be controlled by turning various of the debug options off in the
.options file) Start at the bottom and work up until you find a class load
failure and possibly a plugin activation failure.
Actually, why don't I explain the options file a little more. Here is an
extract from the .options file for the Runtime plugin. (I've inserted the
line numbers to help with the explanation)
1) com.ibm.eclipse.core.runtime/debug=true
2) com.ibm.eclipse.core.runtime/registry/debug=true
3) com.ibm.eclipse.core.runtime/loader/debug=true
4) com.ibm.eclipse.core.runtime/loader/debug/create=true
5) com.ibm.eclipse.core.runtime/loader/debug/actions=true
6) com.ibm.eclipse.core.runtime/loader/debug/success=true
...
#1 this turns on debugging for the Runtime plugin as a whole. If you set
this to false (or delete the line), you turn off of debug mode for the
Runtime plugin.
#2 turns on debugging for the "registry" subpart of the runtime. This is
the bit that loads the plugin.xmls and builds the plugin registry
#3 controls debug mode for the "loader" (aka classloading) part of the
Runtime. This is the area in which you are interested.
#4-6) controls various options within the classloading debug mode. For
example #6 controls whether class loading successes are reported.
There are a number of other flags you will see in the .options file.
Currently the doc in this area is sparse. I'm working on an article for
Eclipse Corner which will talk about this topic in a fair bit of detail and
of course, the doc will be improved.
The summary here is that you probably are missing lines #1 and #3.
Hope that helps,
Jeff
"Elson Yuen" <eyuen@xxxxxxxxxx> wrote in message
news:9b06co$jmf$1@xxxxxxxxxxxxxxxx
> I have tried to debug a plugin class loading problem. I set the -debug
> options when launching the workbench and added .options file with the line
> "com.ibm.eclipse.core.runtim/loader/debug/activateplugin=true". The
> options file is put under the eclipse workbench directory, i.e. the
> working directory of starting the workbench. However, I don't see any
> trace messages displayed.
>
> What is the recommended way to figure out some class loading problem when
> the plugin fails to load some classes?
>
> Thanks,
> Elson
>