difference between Trace and Debug ?

Answer Posted / mickey

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

system.Diagnostics

namespace contains the Debug and Trace classes that include
shared methods.

The diffetrnce between these two classes is in the way Trace
and Debug statements are treated at the of creating a
release bulid.

Trace statements are included by default when the program is
compiled in to release build,where as debug statements are
not.The Debug class is used for debugging,however, the Trace
class is used for testing and optimization even after an
application is compiled and released.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a page life cycle? What are the events in a page life cycle?

493


What is http session state?

525


Explain Authentication mechanism in dotnet

633


What is the function of new view engine in asp.net? : asp.net mvc

549


What are the features that make asp.net more used framework? : asp.net mvc

550






What is _viewstart?

510


How to find last error which occurred in Asp.net ?

687


Explain the difference between dataset and datareader.

535


Why asp.net mvc is better than asp.net? : Asp.Net MVC

501


Explain serialization and deserialization?

553


What are the ways of preserving data on a Web Form in ASP.NET?

624


What is web api and why to use it?

561


When Cookies are expired in ASP.NET?

579


Explain form level validation and field level validation?

519


Explain cookies with example.

562