What is the difference between trace and debug?

4 votes
137 views
Tarun Gautam asked 15-Nov-2017 in programming by Tarun Gautam

What is the difference between trace and debug?

1 Answer

0 votes
Arti Mishra answered 19-Sep-2018 by Arti Mishra
“Difference between trace and debug in asp net”
Debug
  • Debug is mainly used for debugging the line of code during execution.
  • It always runs in the same thread where the execution of the main thread started.
  • For the debugging process, you can use Debug.Write() method.
  • It works only Debug mode.
  • For application development time we can use Debug class.
Trace
  • Trace is mainly used for writing to the log file.
  • It runs on multiple threads.
  • For tracing you can use Trace.Write() method.
  • It works in debug and release mode.
  • For deployment of any application, we can use trace.