<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Customizing the behavior of System.Diagnostics.Debug.Assert [Matt Ellis]</title><link>http://blogs.msdn.com/bclteam/archive/2007/07/19/customizing-the-behavior-of-system-diagnostics-debug-assert-matt-ellis.aspx</link><description>When Inbar posted his refresher on the System.Diagnostics.Debug class , Ron Cain asked an interesting question about Assert in the context of a test harness. Because of this I thought it might be nice to expound on some of the details on exactly how Debug.Assert</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Customizing the behavior of System.Diagnostics.Debug.Assert [Matt Ellis]</title><link>http://blogs.msdn.com/bclteam/archive/2007/07/19/customizing-the-behavior-of-system-diagnostics-debug-assert-matt-ellis.aspx#3960946</link><pubDate>Thu, 19 Jul 2007 21:50:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3960946</guid><dc:creator>Ran Davidovitz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It’s very interesting that I been working on that same issue couple of days ago.&lt;/p&gt;
&lt;p&gt;I have two questions:&lt;/p&gt;
&lt;p&gt;1. I don’t understand why AssertUiEnabled is default to TRUE in ASP.NET application?&lt;/p&gt;
&lt;p&gt;2. Other issue that troubles me is I don’t understand why is the Configuration section classes of all the diagnostics section are internal? (E.g. I wanted to do a simple program that updates the configuration and I had to create wrapper class for the configuration sections and not use the already written classes of .net)?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Customizing the behavior of System.Diagnostics.Debug.Assert [Matt Ellis]</title><link>http://blogs.msdn.com/bclteam/archive/2007/07/19/customizing-the-behavior-of-system-diagnostics-debug-assert-matt-ellis.aspx#3966575</link><pubDate>Fri, 20 Jul 2007 05:04:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3966575</guid><dc:creator>Jonathan Edwards</dc:creator><description>&lt;p&gt;I find Debug.Assert frustrating because it does not do what I want: when running under the debugger, pop straight into the debugger. The dialog is an annoying waste of time. I have written my own Assert that just throws an exception, but it is missing one piece of magic from Debug.Assert:&lt;/p&gt;
&lt;p&gt;How does Debug.Assert keep its own stack frames off the top of the stack? When you click through the dialog the debugger shows the top stack frame from your app, not the Debug class. Is this an undocumented .NET feature?&lt;/p&gt;
</description></item><item><title>re: Customizing the behavior of System.Diagnostics.Debug.Assert [Matt Ellis]</title><link>http://blogs.msdn.com/bclteam/archive/2007/07/19/customizing-the-behavior-of-system-diagnostics-debug-assert-matt-ellis.aspx#3981696</link><pubDate>Sat, 21 Jul 2007 02:05:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3981696</guid><dc:creator>Matt Ellis</dc:creator><description>&lt;p&gt;@Jonathan Edwards,&lt;/p&gt;
&lt;p&gt;By default Visual Studio won't attempt to step into framework code since you likely don't have symbols or sources for it. &amp;nbsp;This is similar to if your code call some framework API that throws an exception, Visual Studio show break into the debugger at the point where your code called the offending method, not within the framework code.&lt;/p&gt;
&lt;p&gt;I think that if you apply System.Diagnostics.DebuggerNonUserCodeAttributeto your new Assert method that Visual Studio will prevent it from being shown on the call stack.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Matt&lt;/p&gt;
</description></item><item><title>re: Customizing the behavior of System.Diagnostics.Debug.Assert [Matt Ellis]</title><link>http://blogs.msdn.com/bclteam/archive/2007/07/19/customizing-the-behavior-of-system-diagnostics-debug-assert-matt-ellis.aspx#4151208</link><pubDate>Tue, 31 Jul 2007 20:48:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4151208</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;I've been setting /configuration/sytem.diagnostics/assert/@assertuienabled to &amp;quot;false&amp;quot; on all my unit testing and ASP.NET applications and it has worked fine, so far.&lt;/p&gt;
</description></item></channel></rss>