difference between trace and debug

Posted by Saranya Boopathi under ASP.NET on 6/11/2013 | Points: 10 | Views : 528 | Status : [Member] | Replies : 3
What's the difference between trace and debug in ASP.NET?

Saranya Boopathi


Responses

Posted by: Satyapriyanayak on: 6/11/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down


http://msdn.microsoft.com/en-us/library/aa309473%28v=vs.71%29.aspx
http://www.dotnetuncle.com/difference/56_trace_debug.aspx

If this post helps you mark it as answer
Thanks

Saranya Boopathi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 6/14/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Both Debug and Trace use System.Diagnostics namespace.

Debug:-

It uses Debug class.
It uses in debug build.
It uses the time of application development.
In Debug mode compiler inserts some debugging code inside the executable.
Debug class works only in debug mode.
Performance analysis cannot be done using Debug.
Debugging uses to find error in program.
For Debug we can use Debug.Write() method.
Debug runs in same thread as main program execute.

Trace:-

It uses Trace class.
Trace statement includes by default when program compiled into released build.
Trace class is used for testing and optimization even after an application is compiled and released.
Trace class works in both case Debug mode as well as release mode.
Trace runs in different thread form main program execute thread.
For Trace we can use Trace.Write() method.
It uses time of application deployment.

Saranya Boopathi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 6/28/2013 [Member] Starter | Points: 25

Up
0
Down
According to Microsoft Documentation there is not much
difference between Trace and Debug Class.

Debug only works in debug mode and trace works in debug and
release both mode.

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Saranya Boopathi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response