hi friends
difference between debug and trace
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Oct 15, 2007, 5:23 AM
http://msdn2.microsoft.com/en-us/library/Aa984620(VS.71).aspx
AlanPosted Sep 30, 2007, 5:45 AM
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.