Win32: How to get the stack trace when compiling with a windows subsystem?

Adam D. Ruppe destructionator at gmail.com
Sun Aug 18 07:23:57 PDT 2013


On Sunday, 18 August 2013 at 14:10:07 UTC, Andrej Mitrovic wrote:
> Actually it would be even better if I could create a console 
> window when building with subsystem:windows, for debugging 
> purposes.


extern(Windows) void AllocConsole(); // not sure if that's the 
perfect signature but it works

void main() {
    debug AllocConsole();
    throw new Exception("test");
}


The problem is the console will close before you can actually 
read it! But it is there and the exception text did appear in it 
so that's something.



More information about the Digitalmars-d-learn mailing list