Why could we debug our application in Release Mode?
-------------
Thanks in Advance
Release Mode Debug in visual studio
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jan 1, 2012, 8:29 PM EST
there are no guarantees that debug mode code works in release mode.
Please read this for more clarification...
VulpesRank #55 · 29.2K reputationPosted Jan 1, 2012, 11:41 PM EST
http://msdn.microsoft.com/en-us/library/system.diagnostics.trace.aspx
The methods of the Trace class (Assert, WriteIf, WriteLine etc) only work if the TRACE pre-processor symbol is defined. In Visual Studio, this symbol is defined by default in both debug and release builds. If the TRACE is symbol is not defined, then the compiler simply removes any calls to Trace class methods or properties.
Sam HobbsRank #107 · 20.5K reputationPosted Jan 1, 2012, 11:56 PM EST
Do you mean to say "why would we" (asking what would be the value) or "how could we" (asking what could be done to do it). Those are very different questions. I think that Jaganathan is explaining why and Vulpes is explaining how. I will provide my answer but I first want to know what the question is.