Skip to main content

debug_nodes_enabled

Function debug_nodes_enabled 

Source
pub fn debug_nodes_enabled() -> bool
Expand description

Env-gated debug-level diagnostic for selection / matching nodes.

Returns true when NBRS_DEBUG_NODES is set to a non-empty, non-"0" value. Cached on first read so the variable can be set once at process start and the per-cycle check is a load.

Used by regex_match, exactly_one_value, and pick to emit pre-eval / pre-panic context (input shape, match result, selector states) when probe phases produce surprising values. The user’s expected workflow:

NBRS_DEBUG_NODES=1 nbrs run my-workload …

then read the stderr trace to see what each matching node saw.