Mono Class Library: System.Diagnostics Namespace

System.Diagnostics.Debug Class

Provides a diagnostic message facility. [Edit]

See Also: Debug Members

public sealed class Debug

See Also

ConditionalAttribute

Remarks

The System.Diagnostics.Debug class provides a mechanism for applications to generate diagnostic messages based on the DEBUG conditional define.

In practice, this means that you can call methods on the System.Diagnostics.Debug class, but in order for them to actually be executed at runtime, you must define the DEBUG symbol during compilation. This can be done either through the C# #define keyword or through the C# compiler -define compiler option.

All diagnostic messages generated are indented by Trace.IndentSize*Trace.IndentLevel space characters. Initially, Trace.IndentLevel is 0 (zero), so no indent is generated.

NOTE: The System.Diagnostics.Debug and System.Diagnostics.Trace classes share their public static properties.

[Edit]

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0