In the namespace System. 1. In Diagnostics. debug. print method Debug. print ("Today: {0}", DateTime. today); 1 Debug. print ("Today: {0}", DateTime. today); 2. debug. writeLine method Debug. writeLine ("Have a nice day"); 1 Debug. writeLine ("Have a nice day"); 3. the TraceListener class DelimitedListTraceListener specifies a file name when it is created. When it is called by Flush, It is overwritten to the file. TraceListener listener = new DelimitedListTraceListener (@ "C: \ debugfile.txt"); // Add listener. traceListener listener = new DelimitedListTraceListener (@ "C: \ debugfile.txt"); // Add listener. debug. listeners. add (listener); // Write and flush. debug. writeLine ("Welcome"); Debug. flush (); 4. debug. write, WriteIf, and WriteLineIf Methods Debug. writeLineIf (IsThursday (), "Thursday"); 1 Debug. writeLineIf (IsThursday (), "T Hursday "); the first parameter is a bool value, which is output if it is true. 5. Debug. Assert method Debug. Assert (value! =-1, "Value must never be-1."); 1 Debug. Assert (value! =-1, "Value must never be-1."); output if the expression is false.