factorize debug() calls