.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
5.14.2004

 
Override Debug.Assert Behavior
Cool, you can suppress the ASSERT GUI handling and have the assertion text write to a file.

<system.diagnostics>
<assert assertuienabled="false" logfilename="c:\TEMP\Debug.log" />
</system.diagnostics>

In this case, your app will continue running, as if you clicked "ignore" in the assertion dialog box. To override this behavior,

Implement a trace listener, override Fail() and call
System.Diagnostics.Debugger.Break()


Google Groups: View Thread "Trace.Assert to console"



Comments: Post a Comment

Powered by Blogger