<?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>Visual C++ Tips &#187; release build problems</title>
	<atom:link href="http://weseetips.com/tag/release-build-problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to Debug the Release Build?</title>
		<link>http://weseetips.com/2008/11/16/how-to-debug-the-release-build/</link>
		<comments>http://weseetips.com/2008/11/16/how-to-debug-the-release-build/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 12:43:32 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Codeproject]]></category>
		<category><![CDATA[Debugging Tips]]></category>
		<category><![CDATA[debug release build]]></category>
		<category><![CDATA[debug the release build]]></category>
		<category><![CDATA[release build]]></category>
		<category><![CDATA[release build problems]]></category>
		<category><![CDATA[release build tips]]></category>
		<category><![CDATA[visual C++ debugging tips]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=607</guid>
		<description><![CDATA[&#8220;Debugging in release build!!! Is it possible?&#8221; I&#8217;ve heard this questions a couple of time, especially from Visual C++ Novices. Yes! its possible. But why? I still remember my first project. We did everything right, debugged and fixed all bugs in debug build and released the application. But client tested the release version and it [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><span style="color:#000000;"><br />
<span style="color:#0000ff;">&#8220;Debugging in release build!!! Is it possible?&#8221;</span> I&#8217;ve heard this questions a couple of time, especially from Visual C++ Novices. <span style="color:#0000ff;">Yes! its possible</span>. But why? </span> I still remember my first project. We did everything right, debugged and fixed all bugs in debug build and released the application. But client tested the release version and it was like <strong><a title="FatMan" href="http://en.wikipedia.org/wiki/Fat_Man" target="_self">FatMan</a></strong>, a lot of crashes.</p>
<p>So, <span style="color:#0000ff;">Debugging in release build is important</span> <span style="color:#0000ff;">because</span>, even though the debug build can catch most of issues, there might be <span style="color:#0000ff;">some bugs or crashes still hiding under the release version</span> of application. For catching them, there is now way other than to debug the release build itself.</p>
<p><img class="alignnone size-full wp-image-597" title="debuginreleasebuild" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/debuginreleasebuild.jpg" alt="debuginreleasebuild" width="450" height="405" /></p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
Well, basically compiler needs debug information for stepping into code while debugging and In release build, by default there will not be any debug information. Compilers cannot interpret or understand optimized code and in release build, optimization will be enabled by default. For <span style="color:#0000ff;">debugging in release build,</span> you&#8217;ve to <span style="color:#0000ff;">generate debug information</span> and to <span style="color:#0000ff;">turn off optimizations</span>. Follow the steps about how to tweak project settings for that.</p>
<p>1) Take project settings by <span style="color:#0000ff;">Alt+F7</span>.<br />
2) Select Release configuration.<br />
3) Select &#8220;<span style="color:#0000ff;">C/C++</span>&#8221; tab. Set &#8220;<span style="color:#0000ff;">Optimizations</span>&#8221; as &#8220;<span style="color:#0000ff;">Disable Debug</span>&#8221; and &#8220;<span style="color:#0000ff;">Debug Info</span>&#8221; as <span style="color:#0000ff;">&#8220;Program Database&#8221;</span>.</p>
<p><img class="alignnone size-full wp-image-600" title="debuginreleasebuild1" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/debuginreleasebuild1.jpg" alt="debuginreleasebuild1" width="510" height="332" /></p>
<p>4) Take &#8220;<span style="color:#0000ff;">Link</span>&#8221; tab. Enable &#8220;<span style="color:#0000ff;">Generate Debug Info</span>&#8220;.</p>
<p><img class="alignnone size-full wp-image-601" title="debuginreleasebuild2" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/debuginreleasebuild2.jpg" alt="debuginreleasebuild2" width="510" height="332" /></p>
<p>5) Now from menu, take &#8211; &#8220;<span style="color:#0000ff;">Build &gt; Set active configuration&#8230;</span>&#8221; and select <span style="color:#0000ff;">Release build</span> as default.</p>
<p><img class="alignnone size-full wp-image-602" title="debuginreleasebuild3" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/debuginreleasebuild3.jpg" alt="debuginreleasebuild3" width="381" height="239" /></p>
<p>6) Rebuild the project by <span style="color:#0000ff;">F7</span>.<br />
7) Now what are you waiting for? <span style="color:#0000ff;">Press F5</span> to debug and enjoy!</p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Since my first project, I don&#8217;t forget how to debug in release version. <img src='http://weseetips.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  and this is my advice for you &#8211; &#8220;<span style="color:#0000ff;">Its fine to do the entire debugging in debug build</span>, because its tuned to catch a lot of bugs. <span style="color:#0000ff;">But </span><span style="color:#0000ff;">before releasing check the release build too</span>.&#8221;</p>
<p><img class="alignnone size-medium wp-image-51" title="beginnerseries" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/11/16/how-to-debug-the-release-build/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

