Clojure Debug
Core workflow
- •Insert
prn(orprn+ labels) as early as possible in the suspected execution path. - •Prefer multiple small
prncheckpoints over one large dump. - •Keep
prnoutput focused on inputs, branch decisions, and key transforms. - •Remove or guard debug prints after validation.
clojure/node CLI validation
- •Use
clojure/nodeCLIevalto validate small snippets or hypotheses. - •Keep eval expressions minimal and deterministic.
- •Use it to confirm parsing, coercion, and data-shape assumptions before editing more code.
Tips
- •Favor
prnoverprintlnto preserve readable EDN. - •When debugging async flows, print at boundaries: before request, after response, before transform, after transform.
- •Add labels to output to correlate logs with branches.