<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dan Merino&#039;s Blog &#187; tracing</title>
	<atom:link href="http://blog.danmerino.com/tag/tracing/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.danmerino.com</link>
	<description>Computer Science, Entrepreneurship and Productivity</description>
	<lastBuildDate>Wed, 21 Dec 2011 06:34:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Conditional Debug mode</title>
		<link>http://blog.danmerino.com/conditional-debug-mode/</link>
		<comments>http://blog.danmerino.com/conditional-debug-mode/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:53:39 +0000</pubDate>
		<dc:creator>danmerino</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[tracing]]></category>

		<guid isPermaLink="false">http://codingadventure.com/?p=56</guid>
		<description><![CDATA[Tweet Sometimes we have to implement code that is only meant to work for us as developers and not the our clients. That is when conditional debug comes to play. Using conditional debug it is possible to only allow some &#8230; <a href="http://blog.danmerino.com/conditional-debug-mode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.danmerino.com%2Fconditional-debug-mode%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.danmerino.com/conditional-debug-mode/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.danmerino.com/conditional-debug-mode/"  data-text="Conditional Debug mode" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://blog.danmerino.com/conditional-debug-mode/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://blog.danmerino.com/conditional-debug-mode/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>Sometimes we have to implement code that is only meant to work for us as developers and not the our clients. That is when conditional debug comes to play. Using conditional debug it is possible to only allow some functions to be called only if the project is running in debug mode.</p>
<p>I found it useful on the following scenarios:</p>
<ul>
<li>Impersonation &#8211; change my context to a specific user contex.</li>
<li>Tracing/Profiling</li>
<li>Testing</li>
</ul>
<p></p>
<pre class="brush: csharp; title: ; notranslate">
[Conditional(&quot;DEBUG&quot;)]

  public void OnlyRunIfUnderDebug(string person)
       {
           //replace context with person's arguments context
           //profiling
           //testing
           //etc
       }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.danmerino.com/conditional-debug-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

