Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Where do all those "trace" check boxes come from when debugging a plugin?
Where do all those "trace" check boxes come from when debugging a plugin? [message #548100] Tue, 20 July 2010 16:23 Go to next message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

And how do I get my own plug-in to support them?

--Mark Storer
Senior Software Engineer
Autonomy Cardiff

import legalese.disclaimer;
Disclaimer<Cardiff> disCard = null;

Google Code Search
Re: Where do all those "trace" check boxes come from when debugging a plugin? [message #548126 is a reply to message #548100] Tue, 20 July 2010 17:47 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Mark Storer wrote:
> And how do I get my own plug-in to support them?

you create a .options file at the base of your plugin (make sure it is
included in your build.properties).

Then have a look at org.eclipse.ui.internal.ide.Policy for an example of
how we use them in the SDK

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Where do all those "trace" check boxes come from when debugging a plugin? [message #548142 is a reply to message #548100] Tue, 20 July 2010 18:48 Go to previous message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

Okey doke. Google code search is ever so helpful in tracking down examples.

Want to see all the eclipse code they can find?
http://www.google.com/codesearch?q=lang%3Ajava+package%3Aorg .eclipse&hl=en&btnG=Search+Code



One of the the internal.policy ".options" file looks like this:
# Debugging options for the org.eclipse.ui.ide plugin.

# Turn on debugging for the org.eclipse.ui plugin.
org.eclipse.ui.ide/debug=false

# Show a dialog with details button when an internal error occur.
org.eclipse.ui.ide/debug/internalerror/openDialog=false

# Verbose information when IDE performs explicit garbage collection
org.eclipse.ui.ide/debug/gc=false

# Print debug information when workspace undo monitor purges the undo history
org.eclipse.ui.ide/debug/undomonitor=false

# Print debug information for core exceptions when accessing markers
org.eclipse.ui.ide/debug/markers=false


And here's how you'd use it in code:

    static {
        if (getDebugOption("/debug")) { //$NON-NLS-1$
            DEBUG_OPEN_ERROR_DIALOG = getDebugOption("/debug/internalerror/openDialog"); //$NON-NLS-1$
            DEBUG_GC = getDebugOption("/debug/gc"); //$NON-NLS-1$
            DEBUG_UNDOMONITOR = getDebugOption("/debug/undomonitor"); //$NON-NLS-1$
            DEBUG_CORE_EXCEPTIONS = getDebugOption("/debug/coreExceptions"); //$NON-NLS-1$
        }
    }

    private static boolean getDebugOption(String option) {
        return "true".equalsIgnoreCase(Platform.getDebugOption(IDEWorkbenchPlugin.IDE_WORKBENCH + option)); //$NON-NLS-1$
    }


The DEBUG_* variables are all public static booleans IIRC... closed the tab.

Oops. The "debug/markers" trace flag isn't checked.


EDIT: I went to whip up a little wiki page on the subject... turns out someone beat me to it:
http://wiki.eclipse.org/FAQ_How_do_I_use_the_platform_debug_ tracing_facility%3F


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

import legalese.disclaimer;
Disclaimer<Cardiff> disCard = null;

Google Code Search

[Updated on: Tue, 20 July 2010 18:52]

Report message to a moderator

Previous Topic:Can't create an IFile within my plugin directory?
Next Topic:How to add submenu using extension "org.eclipse.ui.menus"?
Goto Forum:
  


Current Time: Thu Apr 25 12:47:16 GMT 2024

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

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

Back to the top