Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370604 - Use new dynamic tracing options
Summary: Use new dynamic tracing options
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 M6   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 15:04 EST by Michael Rennie CLA
Modified: 2012-03-14 12:03 EDT (History)
3 users (show)

See Also:


Attachments
POC patch (82.45 KB, patch)
2012-02-03 15:04 EST, Michael Rennie CLA
no flags Details | Diff
screen shot (65.22 KB, image/png)
2012-02-03 15:09 EST, Michael Rennie CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2012-02-03 15:04:44 EST
Created attachment 210526 [details]
POC patch

With the completion of bug 296631 you can now turn on / off tracing as needed. 

This is extremely valuable to debug.ui wrt tracing viewer problems (I can't even recall how many times I have encountered a viewer problem and had to restart to turn on tracing only to find I cannot reproduce the problem anymore).

The attached patch hooks up the dynamic tracing as a test and hooks into the new tracing UI page. A couple of things to think about:

1. currently we use the tracing flags as we always have - i.e. if true sysout a message. This works ok, but it feels to me like the more correct way is to use the DebugTrace service, that way we don't have to manage the state of the trace options at all on the debug side.

2. using sysout with the tracing prefs breaks the pref for an output file -i.e. using sysout completely ignores the output file specified - Chatting with Curtis, this is  another reason to use the DebugTrace service.

3. In the past we had a root level 'debug' option that could be used to disable all other trace options - with the new UI / tracing this does not make much sense, meaning it just appears as another entry in the list, with no visual indication that it can turn off all the other options for a given bundle
Comment 1 Michael Rennie CLA 2012-02-03 15:09:25 EST
Created attachment 210527 [details]
screen shot

In the attached screen shot you can better see what I mean about the root 'debug' option. In the past this appeared in the options file to allow all tracing options to be quickly disabled, but now it causes confusion - if it is not on, the rest of the options do not work.

I guess the best option would be to remove it from the options file.
Comment 2 Pawel Piech CLA 2012-02-03 16:13:32 EST
(In reply to comment #1)
> I guess the best option would be to remove it from the options file.

Awesome!  I agree about removing the root "debug" option, I've never understood the point of it.
Comment 3 Dani Megert CLA 2012-02-04 02:37:04 EST
(In reply to comment #2)
> (In reply to comment #1)
> > I guess the best option would be to remove it from the options file.
> 
> Awesome!  I agree about removing the root "debug" option, I've never understood
> the point of it.

Bad idea, see org.eclipse.core.runtime.Plugin.isDebugging().
Comment 5 Michael Rennie CLA 2012-03-14 12:03:39 EDT
Verified in:

Version: 4.2.0
Build id: I20120313-0610