A Clojure library designed to trace evaluation of functions calls, macros and special forms. It indents any output.
It logs entering and leaving functions or macros/special forms. It indents them, along with any inner output - simple and pretty. You prefix function calls with dbgf
or macros/special forms with dbg
. It works without any extra parens (). Hence diffs are shorter, easier to read. Isn't that practical?
(dbgf function-name-or-function-generating-expression parameters-if-any...)
(dbg macro-or-special-form-or-function-name parameters-if-any...)
Those serve to replace loop
and recur
. However, in order to indent any output, they don't use tail recursion. Instead, they use stack. Hence they may run out of stack space for long iterations.
(dbgloop [initial bindings] forms...)
(dbgrecur [new binding values])