When you say "hit an error", I'm assuming you mean "clojure throws an exception" and not "hit a breakpoint in a debugger" or something else.
I don't think there is one place where we could generically attach locals info to a thrown exception. The JVM debugging interface (JVMTI - http://docs.oracle.com/javase/7/docs/technotes/guides/jvmti/index.html) can do an awful lot of things (including arbitrary class bytecode transformation) so I would guess it's possible to build a java agent that could do this (or to modify the Compiler to inject the right code at compile time). Sounds like a fun project, but probably non-trivial. On Thursday, November 7, 2013 3:34:23 PM UTC-6, Lee wrote: > > > What would I need to do to get it to not only retain locals but also show > them to me when I hit an error? > > -Lee > > On Nov 7, 2013, at 4:22 PM, Alex Miller wrote: > > > I believe the locals are actually *not* available because they are > proactively cleared to help GC. > > > > Setting the *compiler-options* var with :disable-locals-clearing can > turn that off. Which is probably what you often want in dev, but is not the > default. You can also set this via command line with > -Dclojure.compile.disable-locals-clearing=true > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.