Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Platform.getDebugOption(optionName) question
Platform.getDebugOption(optionName) question [message #307775] Thu, 31 August 2006 17:08 Go to next message
Michael Giroux is currently offline Michael GirouxFriend
Messages: 287
Registered: July 2009
Senior Member
Actually, I have three questions. I have written a plugin that is trying to
use these methods, and I'm not sure what my expectations should be.

1. The Plug-in Development Environment Guide topic on
Tools/Launchers/Eclipse Application Launcher/Tracing Tab explains that a
plugin can determine if it is in debug mode via <Activator>.isDebugging().
This would suggest that it is possible to place individual plug-ins into
debug mode, but as I understand it, the eclipse commandline -debug option
turns on debug mode for the entire platform.

Q1. is it actually possible to enable debugging for individual plugins?

2. In the same Tracing Tab topic, we learn that we can use
Platform.getDebugOption(optionName) to obtain the value of an individual
debug option. I've looked at the source, but could not determine how the
method works if the platform is not in debug mode.

Q2. if the platform is *not* in debug mode, does this method always return
null? Even if the option is specified in a .options file in the install
directory?

Q3. if the platform *is* in debug mode, will a value be returned from the
plugins .options file if it is not defined in the platform .options file,
or is the sole source the platform .options file? Put another way, if an
option is not in the platform .options file, will the method always return
null?

Thanks
Michael
Re: Platform.getDebugOption(optionName) question [message #307786 is a reply to message #307775] Fri, 01 September 2006 19:10 Go to previous message
Michael Giroux is currently offline Michael GirouxFriend
Messages: 287
Registered: July 2009
Senior Member
Well, given a little experimentation, and a closer read of the document I
have discovered the answers:

"Michael Giroux" <michael.giroux@bull.com> wrote in message
news:ed7520$nmg$1@utils.eclipse.org...
> Actually, I have three questions. I have written a plugin that is trying
> to use these methods, and I'm not sure what my expectations should be.
>
> 1. The Plug-in Development Environment Guide topic on
> Tools/Launchers/Eclipse Application Launcher/Tracing Tab explains that a
> plugin can determine if it is in debug mode via <Activator>.isDebugging().
> This would suggest that it is possible to place individual plug-ins into
> debug mode, but as I understand it, the eclipse commandline -debug option
> turns on debug mode for the entire platform.
>
> Q1. is it actually possible to enable debugging for individual plugins?

Yes. The "master debug" switch defined as <pluginID>/debug can be set for
each plugin.

> 2. In the same Tracing Tab topic, we learn that we can use
> Platform.getDebugOption(optionName) to obtain the value of an individual
> debug option. I've looked at the source, but could not determine how the
> method works if the platform is not in debug mode.
>
> Q2. if the platform is *not* in debug mode, does this method always return
> null? Even if the option is specified in a .options file in the install
> directory?

Yes. If the -debug option is not specified, .options are not loaded,
and as a result, calls to getDebugOption return null.

> Q3. if the platform *is* in debug mode, will a value be returned from the
> plugins .options file if it is not defined in the platform .options file,
> or is the sole source the platform .options file? Put another way, if an
> option is not in the platform .options file, will the method always return
> null?

No. The only options returned by getDebugOption come from the
file specified by -debug, or the default .options in the install root.


>
> Thanks
> Michael
>
Previous Topic:Making CheckboxTableViewer single checked
Next Topic:Remove default Update Manager entries?
Goto Forum:
  


Current Time: Tue Sep 24 16:54:10 GMT 2024

Powered by FUDForum. Page generated in 0.06030 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top