What are the differences between Trace and Debug?

Answers were Sorted based on User's Feedback



What are the differences between Trace and Debug?..

Answer / vinod reddy

Trace and Debug - There are two main classes that deal with
tracing - Debug and Trace. They both work in a similar way -
the difference is that tracing from the Debug class only
works in builds that have the DEBUG symbol defined, whereas
tracing from the Trace class only works in builds that have
the TRACE symbol defined. Typically this means that you
should use System.Diagnostics.Trace.WriteLine for tracing
that you want to work in debug and release builds, and
System.Diagnostics.Debug.WriteLine for tracing that you want
to work only in debug builds.

Tracing is actually the process of collecting information
about the program's execution. Debugging is the process of
finding & fixing errors in our program. Tracing is the
ability of an application to generate information about its
own execution. The idea is that subsequent analysis of this
information may help us understand why a part of the
application is not behaving as it should and allow
identification of the source of the error.

Is This Answer Correct ?    5 Yes 0 No

What are the differences between Trace and Debug?..

Answer / dasharatham

trace allows us to view how the code executed in details.

Debug allows line by line exection..

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

How does u call and execute a sp in .net?

0 Answers  


what are the events in ASP.net page life cycle?

1 Answers  


8. Why do you want to work here?

0 Answers   Global Achievers, Swatz Oils,


what is meant by sitemapnode ?

0 Answers   Netsweeper,


What is autopostback true?

0 Answers  






What is the relationship(in oops) between codebehind and inline code(.aspx to .aspx.cs)??? explain

4 Answers   Mind Tree,


How does session authentication work?

0 Answers  


Briefly describe the role of global.asax?

0 Answers  


Hi, I am a fresher. i have a problem related to DataGrid . i have a data grid and i have to place a dropdown in the datagrid.and i have to retrieve the values from the database (sqlserver).please tell me any idea about the code.

1 Answers   Lambent,


What are different templates available in Repeater,DataList and Datagrid ?

1 Answers  


What is asp.net globalization?

0 Answers  


Explain form level validation and field level validation?

0 Answers  


Categories