Debug Methods
.NET Framework 4
The Debug type exposes the following members.
| Name | Description | |
|---|---|---|
|
Assert(Boolean) | Checks for a condition; if the condition is false, displays a message box that shows the call stack. |
|
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. |
|
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. |
|
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. |
|
Close | Flushes the output buffer and then calls the Close method on each of the Listeners. |
|
Fail(String) | Emits the specified error message. |
|
Fail(String, String) | Emits an error message and a detailed error message. |
|
Flush | Flushes the output buffer and causes buffered data to write to the Listeners collection. |
|
Indent | Increases the current IndentLevel by one. |
|
Print(String) | Writes a message followed by a line terminator to the trace listeners in the Listeners collection. |
|
Print(String, Object[]) | Writes a formatted string followed by a line terminator to the trace listeners in the Listeners collection. |
|
Unindent | Decreases the current IndentLevel by one. |
|
Write(Object) | Writes the value of the object's ToString method to the trace listeners in the Listeners collection. |
|
Write(String) | Writes a message to the trace listeners in the Listeners collection. |
|
Write(Object, String) | Writes a category name and the value of the object's ToString method to the trace listeners in the Listeners collection. |
|
Write(String, String) | Writes a category name and message to the trace listeners in the Listeners collection. |
|
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. |
|
WriteIf(Boolean, String) | Writes a message to the trace listeners in the Listeners collection if a condition is true. |
|
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. |
|
WriteIf(Boolean, String, String) | Writes a category name and message to the trace listeners in the Listeners collection if a condition is true. |
|
WriteLine(Object) | Writes the value of the object's ToString method to the trace listeners in the Listeners collection. |
|
WriteLine(String) | Writes a message followed by a line terminator to the trace listeners in the Listeners collection. |
|
WriteLine(Object, String) | Writes a category name and the value of the object's ToString method to the trace listeners in the Listeners collection. |
|
WriteLine(String, Object[]) | Writes a formatted message followed by a line terminator to the trace listeners in the Listeners collection. |
|
WriteLine(String, String) | Writes a category name and message to the trace listeners in the Listeners collection. |
|
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. |
|
WriteLineIf(Boolean, String) | Writes a message to the trace listeners in the Listeners collection if a condition is true. |
|
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. |
|
WriteLineIf(Boolean, String, String) | Writes a category name and message to the trace listeners in the Listeners collection if a condition is true. |