Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Ticket #12 (new defect)

Opened 15 years ago

Last modified 15 years ago

tango.util.log.Trace causes issues when application compiled in gui mode

Reported by: sleek Assigned to: keinfarbton
Priority: major Milestone:
Component: DWT-Win Version:
Keywords: Cc:

Description

When the app is compiled with -L/subsystem:windows:5, there is no console available when launching, for example, by double-clicking the exe in windows explorer.

One place that causes an issue is dwthelper/ResourceBundle.d. In the constructor, there are calls to Trace(), which are just simple debug statements. I think it makes more sense to do the following:

debug import tango.util.log.Trace;

Then when you need to see debug statements, you can just do the following:

debug Trace.formatln("I'm a debug line");

Change History

01/03/09 00:27:19 changed by sleek

Forgot to mention why this is bad... The application won't start up. An exception is thrown and the GUI never gets displayed. Specifically, the Trace.formatln() causes an IOException to be thrown.