Debug Methods

The Debug type exposes the following members.

  Name Description
Public method Static member Assert(Boolean) Checks for a condition; if the condition is false, displays a message box that shows the call stack.
Public method Static member Assert(Boolean, String) Checks for a condition; if the condition is false, outputs a specified message and displays a message box that shows the call stack.
Public method Static member Assert(Boolean, String, String) Checks for a condition; if the condition is false, outputs two specified messages and displays a message box that shows the call stack.
Public method Static member Assert(Boolean, String, String, Object[]) Checks for a condition; if the condition is false, outputs two messages (simple and formatted) and displays a message box that shows the call stack.
Public method Static member Close Flushes the output buffer and then calls the Close method on each of the Listeners.
Public method Static member Fail(String) Emits the specified error message.
Public method Static member Fail(String, String) Emits an error message and a detailed error message.
Public method Static member Flush Flushes the output buffer and causes buffered data to write to the Listeners collection.
Public method Static member Indent Increases the current IndentLevel by one.
Public method Static member Print(String) Writes a message followed by a line terminator to the trace listeners in the Listeners collection.
Public method Static member Print(String, Object[]) Writes a formatted string followed by a line terminator to the trace listeners in the Listeners collection.
Public method Static member Unindent Decreases the current IndentLevel by one.
Public method Static member Write(Object) Writes the value of the object's ToString method to the trace listeners in the Listeners collection.
Public method Static member Write(String) Writes a message to the trace listeners in the Listeners collection.
Public method Static member Write(Object, String) Writes a category name and the value of the object's ToString method to the trace listeners in the Listeners collection.
Public method Static member Write(String, String) Writes a category name and message to the trace listeners in the Listeners collection.
Public method Static member WriteIf(Boolean, Object) Writes the value of the object's ToString method to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteIf(Boolean, String) Writes a message to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteIf(Boolean, Object, String) Writes a category name and the value of the object's ToString method to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteIf(Boolean, String, String) Writes a category name and message to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteLine(Object) Writes the value of the object's ToString method to the trace listeners in the Listeners collection.
Public method Static member WriteLine(String) Writes a message followed by a line terminator to the trace listeners in the Listeners collection.
Public method Static member WriteLine(Object, String) Writes a category name and the value of the object's ToString method to the trace listeners in the Listeners collection.
Public method Static member WriteLine(String, Object[]) Writes a formatted message followed by a line terminator to the trace listeners in the Listeners collection.
Public method Static member WriteLine(String, String) Writes a category name and message to the trace listeners in the Listeners collection.
Public method Static member WriteLineIf(Boolean, Object) Writes the value of the object's ToString method to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteLineIf(Boolean, String) Writes a message to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteLineIf(Boolean, Object, String) Writes a category name and the value of the object's ToString method to the trace listeners in the Listeners collection if a condition is true.
Public method Static member WriteLineIf(Boolean, String, String) Writes a category name and message to the trace listeners in the Listeners collection if a condition is true.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft