Debug
- Debug is mainly used for debugging the line of codeduring 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.