... be in the range [0,1], otherwise the current state remains unchanged): hb_tracestate( state ); Therefore, to just query the current state, you can safely call current_state = hb_tracestate( -1 ); To turn tracing completely off: hb_tracestate( 0 ); To turn tracing back on: hb_tracestate( 1 ); * ...