Hacker News new | ask | show | jobs
by geokon 1814 days ago
That allows you to step through code. but it doesn't break when you get a crash (like gdb). At least when I just tested:

     #dbg(defn get-first [input] (nth input 0))
     (get-first [4 2 3]) ;; 4
     (get-first 5) ;; gives me a stack trace and no program state
So it's nice to have, but I think this is maybe only useful if you're working through someone else's code?
1 comments

This is not such a huge issue in practice. It is often enough to step through the debugger and see exactly what is failing.

In conjunction with scope-capture, it is trivial to run that failing code again to have a closer look, and modify it to your liking till it runs as expected.

There are also conditional restart systems for Clojure that offer much more than this.