Browse Clojure Foundations for Java Developers

Debugging Techniques and Tools

Use the REPL, inspect values, and read stack traces effectively on the JVM.

Debugging in Clojure is often faster than in Java because you can reproduce behavior in a REPL with small forms and inspect real values at each step.

Useful habits:

  • print or tap values intentionally (tap>, pprint) instead of logging everything
  • read stack traces and use ex-data when errors carry structured context
  • expand macros (macroexpand-1) when control flow is confusing

The goal is to build a repeatable debugging loop that works both locally and in production-like environments.

In this section

Revised on Friday, April 24, 2026