Hi friends
difference between debug and trace
2 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
AlanRank #669 · 3.6K reputationPosted Sep 30, 2007, 1:45 AM EDT
As the functionality of the Debug and Trace classes is much the same, the difference lies in when they are used rather than what they do.
Basically, 'Debug' only looks for problems when a program is in debug mode and 'Trace' continues to monitor a program's health after deployment (i.e. in release mode).
Including debug code will not increase the size of the deployed program because the compiler will simply ignore it. However, including trace code will increase the size of the deployed program and you therefore need to weigh this extra size and possible performance penalty against the benefits of having trace functionality. If the extra costs are not acceptable, then disable trace and just use debug.
In VS 2005, the DEBUG compiler directive is enabled by default in debug mode and the TRACE compiler directive is enabled by default in both debug and release modes.
Posted Oct 15, 2007, 1:23 AM EDT
http://msdn2.microsoft.com/en-us/library/Aa984620(VS.71).aspx