- Debugging infrastructure: on-screen output, serial (dcload),
performance profiling, memory tracking, error reporting, assertion
system, debug menu
- All features implemented in
debug_system.c and
debug_menu.c
- Debug levels: ERROR → WARN → INFO → DEBUG → TRACE
- Backend architecture: Screen, Serial, File, Memory (ring buffer) —
pluggable via
d3tui_debug_backend_t
- Assertion macros:
d3tui_assert(cond),
d3tui_assert_msg(cond, msg) with
d3tui_debug_break()
- Error codes: NONE, MEMORY, FILE_NOT_FOUND, INVALID_FORMAT, HARDWARE,
UNSUPPORTED, TIMEOUT
- Debug menu tree: System Info → Performance → Rendering → Input →
Memory → Commands → Exit
- SPECTRE Profiler (Spec 8) integration for frame/profiling zones
- Conditional compilation:
#ifdef DEBUG enables all;
release builds compile out to no-ops
- Implementation size: ~65KB