debug_only

Macro debug_only 

Source
macro_rules! debug_only {
    ($block:expr) => { ... };
}
Expand description

Executes a block only in debug builds.

This is useful for debug-only side effects like logging or metrics collection, where the block’s return value is not needed.

In release builds, the block is completely eliminated.

§Examples

use varvedb::debug_only;

debug_only!({
    eprintln!("Debug info: buffer size = {}", buffer.len());
    collect_metrics();
});