Skip to main content

Module debug_cfg

Module debug_cfg 

Source
Expand description

Centralised debug configuration.

All global toggles and knobs that control debug output, diagnostic behaviour, or temporary workarounds live here. When a debug feature is no longer needed, simply flip the default to false : no other code changes required.

§Future additions

  • TRACE_SYSCALLS: log every syscall entry/exit
  • TRACE_CONTEXT_SWITCH: log every task switch
  • VGA_DEBUG_LIVE: real-time VGA framebuffer output (already here)
  • PANIC_SCREENSHOT: dump framebuffer to serial on panic
  • LOG_MM: trace memory allocations

Statics§

VGA_DEBUG_BUFFER
When true (default), log lines are also written into the lock-free circular buffer (vgabuf) for async display by the status line task.
VGA_DEBUG_LIVE
When true, every log::info! / log::warn! / etc. is drawn directly to the VGA framebuffer in real time (pixel by pixel, no buffering).

Functions§

is_vga_debug_buffer
Returns true if buffered VGA output is enabled.
is_vga_debug_live
Returns true if live VGA debug output is enabled.
set_vga_debug_buffer
Enable or disable buffered VGA output.
set_vga_debug_live
Enable or disable live VGA debug output.