Assert and the optional Message

Jonathan M Davis jmdavisProg at gmx.com
Fri Mar 9 03:02:51 PST 2012


On Friday, March 09, 2012 10:55:10 Mars wrote:
> On Friday, 9 March 2012 at 07:55:56 UTC, Jonathan M Davis wrote:
> > What you should almost certainly be doing is changing Visual
> > Studio's settings
> > so that it doesn't close the Window when the program exits. I
> > know that it's
> > possible. I've done it, but I rarely use Windows, and I don't
> > remember what
> > you have to do. So, unfortunately, I can't be of much help to
> > you there, but
> > that's the solution that you should almost certainly be using.
> > If no one else
> > around here can post how to do it, then I would think that
> > you'd be able to
> > find how via google easily enough.
> > 
> > - Jonathan M Davis
> 
> Are you sure you've tested this with D? Because VisualD doesn't
> support that yet, afaik.

I've never used Visual Studio with D, and I wouldn't expect telling it not 
close the window after execution to be any different in D than it is in C++, 
but I don't know. Regardless, contorting your program to try and print assert 
messages to a file just because VisualD has problems with closing the Window on 
you is a _bad_ idea IMHO. If it really has that problem, and you really need 
to see the assertion without running the debugger on it, I'd advise just 
running the program on the command line.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list