Community
Participate
Working Groups
Created attachment 142369 [details] Project containing a test case I try to set a plug-in into debug mode. However, after calling Plugin.setDebugging(true) the Plugin.isDebugging() method delivers false. I guess this has something to do with the implementation of setOption(String,String) in org.eclipse.osgi.framework.debug.FrameworkDebugOptions. _test.SetDebuggingTest in the attached project illustrates the problematic behaviour.
Created attachment 142404 [details] patch There are two bugs here I think: 1) The Plugin.setDebugging method ultimately needs to call DebugOptions.setDebugEnabled(true) I would have thought this could be worked around by simply using the -debug option with no options file. This enables the DebugOptions service but it still does not allow options to be set. These leads to the second bug in FrameworkDebugOptions 2) FrameworkDebugOptions should allow options to be set if the -debug option is used even if there is no options file to read at initialization. In this case the current code will null out the "options" field which prevents any options from being set.
A workaround is to use the -debug option to launch and point it to a file that contains least one property. This property can just be junk: workaroundBug284397=true
your patch works for me. Thanks.
Sorry, this bug has been sitting here so long with an unreleased patch. I released the patch for 3.6 M4. John, do you think we should consider this bug for 3.5.2?
(In reply to comment #4) > Sorry, this bug has been sitting here so long with an unreleased patch. I > released the patch for 3.6 M4. John, do you think we should consider this bug > for 3.5.2? I don't think so - it is not a critical bug or regression for an end user.