TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl/llms.txt
Use this file to discover all available pages before exploring further.
Debug class is Prowl’s unified diagnostics hub. It routes structured log messages to the editor Console Window, captures C# stack traces for every log entry, fires an OnLog event so any subsystem can subscribe to log output, and provides assert and guard helpers for defensive programming. Beyond logging, Debug is also the entry point for the engine’s gizmo drawing system — the visual overlays used in the Scene View to visualise colliders, paths, and other editor-only geometry. Every log call captures a DebugStackTrace at a cost of roughly 15 µs on modern hardware, which is acceptable for debugging but should be avoided in tight inner loops in shipping builds.
Log Severity Levels
Logging Methods
Log
LogSeverity.Normal. The object overload calls .ToString() on the argument.
LogWarning
LogSeverity.Warning. Use for non-fatal conditions that should be investigated.
LogError
LogSeverity.Error. Use for recoverable failures, missing assets, or violated contracts.
LogSuccess
LogSeverity.Success (green). Useful for confirming successful operations such as asset loads or network connections.
LogException
LogSeverity.Exception. Prints exception.Message, the inner exception message (if present), and the full stack trace of the exception. Also fires OnLog with the combined message.
The exception to log. Its
InnerException is also included if non-null.Log (full overload)
DebugStackTrace instead of capturing one automatically.
Log message text.
Severity level.
When provided, this trace is used instead of capturing a new one from the call site. Useful when logging errors forwarded from another context.
OnLog Event
OnLog is:
Stack Trace Types
DebugStackFrame
ToString() formats it as:
"In TypeName.MethodName at file.cs(line,col)"when a method is known."At file.cs(line)"otherwise.
DebugStackTrace
DebugStackFrame entries. Can be explicitly cast from a System.Diagnostics.StackTrace:
Assert and Guard Helpers
Assert
System.Diagnostics.Debug.Assert. Throws in debug builds when condition is false.
If (conditional throw)
Exception(message) when condition is true. Use to guard invalid states:
IfNull
Exception(message) when value is null.
IfNullOrEmpty
string.IsNullOrEmpty(value).
Gizmo Drawing
Debug also hosts the engine’s gizmo system. Gizmo calls are collected each frame and rendered as wire or solid overlays in the Scene View only (they do not appear in the game view).
All gizmo draw calls are batched. Call them from
OnDrawGizmos or equivalent per-frame callbacks; they are cleared each frame by Debug.ClearGizmos().Matrix Stack
Primitives
Usage Examples
Editor Console Window
The Console Window in the Prowl Editor displays each logged entry with:- A severity icon and colour corresponding to its
LogSeverity. - The message text.
- A collapsible stack trace showing the file, line, and method name at each frame.
- Filter toggles per severity level so you can hide
Normalnoise and focus onWarning/Errorentries.