Bug 515849 - Enable Device.DEBUG via SWT_DEBUG=1 env variable
Summary: Enable Device.DEBUG via SWT_DEBUG=1 env variable
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.11 M3   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-04-26 10:47 EDT by Leo Ufimtsev CLA
Modified: 2019-02-19 09:23 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-04-26 10:47:07 EDT
We should have a mechanism that turns on Device.DEBUG when SWT_DEBUG=1 is set, to help debug & develop swt code base.

Device.DEBUG is used to print warnings in some places in SWT. Currently it can be set in a snippet:

... main {
Device.DEBUG = true;
..
Display display = ...
..
}

Or from platform.ui:
https://www.eclipse.org/swt/faq.php#debugmode

And further, in general, if we want to print a warning, we should consider wrapping it into an if (Device.DEBUG) {..} block.
Comment 1 Eclipse Genie CLA 2019-02-08 10:27:48 EST
New Gerrit change created: https://git.eclipse.org/r/136538
Comment 3 Eric Williams CLA 2019-02-08 12:02:27 EST
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/136538 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=0be4b8fcc50e0d652b8f565cdf98e43e5de34cc3

In master now.
Comment 4 Eric Williams CLA 2019-02-19 09:23:55 EST
Verified in I20190219-0600.