On Fri 27 Dec 2013 at 11:03:20PM -0500, Lee Spector wrote: > On Dec 27, 2013, at 10:53 PM, Alex Baranosky wrote: > > > I always hear people say that the errors are bad, but I just don't > > see it. The stacktraces say exactly what went wrong and at what line > > of the source. To me that's all I can hope for.
I'll have to agree with Alex, I've never really had that much of a problem with Clojure errors. A stacktrace is certainly better than "Segmentation fault". > One can hope to see the values of locals, which for me would make a > big difference. This is apparently possible (through some combination > of nrepl-ritz and avoiding locals clearing, I think), but not at all > easy. In other parts of the Lisp universe this has been standard for > decades and, I think, central to common debugging practices. I personally use the following macro from my user.clj: (defmacro dump-locals [] `(clojure.pprint/pprint ~(into {} (map (fn [l] [`'~l l]) (reverse (keys &env)))))) It's not the automatic break-on-exception-and-start-local-repl of CL + Emacs, but it's editor agnostic and usually does the trick. I find that my desires for a stepping debugger are mostly absent with Clojure as data is immutable, and the reference types may be monitored with add-watch. guns
pgpGmxZq3WqAn.pgp
Description: PGP signature