Table of Contents

Class Debug

Namespace
System.Diagnostics
Assembly
mscorlib.dll

Provides a set of methods and properties that help debug your code.

public static class Debug
Inheritance
Debug
Inherited Members

Methods

Assert(bool)

Causes a break in execution if the specified assertion (condition) evaluates to false.

[Conditional("DEBUG")]
public static void Assert(bool condition)

Parameters

condition bool

The condition to be evaluated. If the value is false, program execution stops.

Assert(bool, string)

Causes a break in execution if the specified assertion (condition) evaluates to false.

[Conditional("DEBUG")]
public static void Assert(bool condition, string message)

Parameters

condition bool

The condition to be evaluated. If the value is false, program execution stops.

message string

The text to be output if the assertion is false.

Assert(bool, string, string)

Causes a break in execution if the specified assertion (condition) evaluates to false.

[Conditional("DEBUG")]
public static void Assert(bool condition, string message, string detailedMessage)

Parameters

condition bool

The condition to be evaluated. If the value is false, program execution stops.

message string

The text to be output if the assertion is false.

detailedMessage string

The detailed message to be displayed if the assertion is false.

Write(string)

Writes a message to the trace listeners in the Listeners collection.

[Conditional("DEBUG")]
public static void Write(string message)

Parameters

message string

A message to write.

Remarks

In .NET nanoFramework implementation the message is output to Visual Studio debugger window.

WriteLine()

Writes the current line terminator to the standard output stream.

[Conditional("DEBUG")]
public static void WriteLine()

Remarks

In .NET nanoFramework implementation the message is output to Visual Studio debugger window.

WriteLine(string)

Writes a message followed by a line terminator to the trace listeners in the Listeners collection.

[Conditional("DEBUG")]
public static void WriteLine(string message)

Parameters

message string

A message to write.

Remarks

In .NET nanoFramework implementation the message is output to Visual Studio debugger window.