Skip to main content

Module debug_trace

Module debug_trace 

Source
Expand description

Zero-cost debug tracing controlled by environment variable.

Enable runtime debug output by setting FTUI_DEBUG_TRACE=1 before launching your application. When disabled (the default), the trace checks compile down to a single static bool load with no other overhead.

§Usage

FTUI_DEBUG_TRACE=1 cargo run -p ftui-demo-showcase

This module provides debug_trace! macro for conditional debug output:

use ftui_runtime::debug_trace;
debug_trace!("loop iteration {}", count);

Functions§

elapsed_ms
Get elapsed time since program start in milliseconds.
is_enabled
Check if debug tracing is enabled.