On Dec 18, 2010, at 11:25 AM, Aaron Cohen wrote: > There already exists clojure.contrib.repl-utils/add-break-thread! > which attempts to address this. > (http://clojure.github.com/clojure-contrib/repl-utils-api.html#clojure.contrib.repl-utils/add-break-thread!). > I'm not sure there's any way to resume the broken-into threads though.
It's not just resumption that's missing (at least in my experience -- see details below), but also the REPL in the context of the break (which is really the most useful thing for me anyway, to be able to look at the values of variables, including locals, at the point of the interruption). I'd love to know if I should be getting a break REPL and if I'm just doing something wrong. When I use add-break-thread! under Eclipse/CCW on a mac it seems to make no difference at all -- Cntrl-C doesn't do anything. But maybe that's Eclipse or Mac OS X getting in the way? When I run the same code from a java command line under linux it does change the behavior of Cntrl-C, but the only apparent difference is that I get a stack dump before termination. But I still end up back in the shell, with no REPL. Here's the code I was using to test this: (ns breaker (:require [clojure.contrib.repl-utils :as ru])) (ru/add-break-thread!) (loop [x 0] (println x) (recur (inc x))) And here's my java command line: java -cp $PWD:* clojure.main -i breaker.clj FWIW the 3 methods I've been using to run Clojure code are Eclipse/CCW, a java command line like the above, and recently cake (with or without TextMate). I suspect that someone may say that the way to do what I'm describing is with emacs... and my reply would be that that would be useful, and I'd like to know about it, but that I would also be (more) interested in a way to do it outside of an emacs-based development environment. I use emacs and have it set up for clojure but the setup issues and usability issues are a real pain for me, especially in a teaching context. -Lee -- 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