Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 515849

Summary: Enable Device.DEBUG via SWT_DEBUG=1 env variable
Product: [Eclipse Project] Platform Reporter: Leo Ufimtsev <lufimtse>
Component: SWTAssignee: Eric Williams <ericwill>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 4.7Keywords: triaged
Target Milestone: 4.11 M3   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/136538
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0be4b8fcc50e0d652b8f565cdf98e43e5de34cc3
Whiteboard:

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.