.Net - What are Debug and Trace classes? - June 03, 2009
at 11:00 AM by Shuchi Gauri
What are Debug and Trace classes? Explain how to use them to display error
classes.
Both are used to help programmers find errors, occurring events and flow of
code. In release mode, however, debug class is disabled and only Trace class is
valid to trap things in a live application.
Both have assert functions to validate values.
Trace.WriteLine(variable value or comment).
Debug.WriteLine(variable value or comment).
We could create error handlers to trap unhandled exceptions trapped by Trace and
Debug class.
Also read
How do we step through code?, What are the debugging windows
available?.................
What is Break mode?, What are the options for stepping through code?, What is a
Breakpoint?, Define Debug and Trace Class, Explain how to configure Trace
switches in the application's .config file, What are Trace
switches?................
What is break mode? What are the options to step through code?, Debug Vs Trace,
Define trace class, Define Listeners collection of Trace and Debug objects,
Define Trace Switches.................
Debug.Write: Debug Mode, Release Mode (used while debuging a
project)...............
Breakpoints: displays a list of all the breakpoints and where they are.........
Both are used to help programmers find errors, occurring events and flow of
code..........
|