Diagnostics Module

Debug, Trace, Stopwatch, StackTrace, and debugger attributes.

Debug and Trace

include/System/Diagnostics/Debug.hpp | include/System/Diagnostics/Trace.hpp

Header-only static classes. Provide assertions and trace output that mirror .NET's Debug/Trace API.

Stopwatch

include/System/Diagnostics/Stopwatch.hpp

Measures elapsed time. Backed by C++ std::chrono.

System::Diagnostics::Stopwatch sw;
sw.Start();
// ... code to measure ...
sw.Stop();
long ms = sw.ElapsedMilliseconds;

Debugger

include/System/Diagnostics/Debugger.hpp

Static class with Break() (calls platform breakpoint) and IsAttached.

StackTrace and StackFrame

include/System/Diagnostics/StackTrace.hpp | StackFrame.hpp

Status: Stub

Exist for API compatibility. Stack capture is platform-specific and not fully implemented.

Diagnostic Attributes (Stubs)

Many diagnostic attributes exist as stub classes for API compatibility:

AttributeHeader
ConditionalAttributeSystem/Diagnostics/ConditionalAttribute.hpp
DebuggableAttributeSystem/Diagnostics/DebuggableAttribute.hpp
DebuggerDisplayAttributeSystem/Diagnostics/DebuggerDisplayAttribute.hpp
DebuggerHiddenAttributeSystem/Diagnostics/DebuggerHiddenAttribute.hpp
DebuggerBrowsableAttributeSystem/Diagnostics/DebuggerBrowsableAttribute.hpp
StackTraceHiddenAttributeSystem/Diagnostics/StackTraceHiddenAttribute.hpp

Code Analysis Attributes

include/System/Diagnostics/CodeAnalysis/CodeAnalysisAttributes.hpp

Nullable analysis and code flow attributes: NotNull, MaybeNull, AllowNull, etc.