On Jul 21, 8:47 am, Ramakrishnan Muthukrishnan <[email protected]>
wrote:
> On Wed, Jul 21, 2010 at 11:52 AM, Krukow <[email protected]> wrote:
>
> > I am interested in getting the combination of Emacs+slime+swank-
> > clojure, alex-and-georges.debug-repl and clojure debugging toolkit to
> > work together.
>
> debug-repl is kind of integrated already into swank by Hugo Duncan.
>
> > user> (let [c 1
> > d 2]
> > (defn a [b c]
> > (debug-repl)
> > d))
> > (a "foo" "bar")
> > dr-1-1001 => 2
> > user>
>
> Just put (swank.core/break) instead of (debug-repl)
>
> <http://hugoduncan.org/post/2010/swank_clojure_gets_a_break_with_the_l...>
>
> --
> Ramakrishnan
Thanks. That works :)
However, I did find a bug with that.
It seems to require that print-dup is defined on all locals.
For example, consider:
(defn extract-all []
(let [cs (parse/get-contactids)
cli (:client (get-client {:username "kkr" :password "hidden"}))
pref "/Users/krukow/workspaces/trifork/intrafoo_clj/contactdata/"]
(println "storing...")
(swank.core/break)
(store-all cs cli pref)))
Now I run:
com.trifork.intrafoo.clj.extract-contacts> (extract-all)
storing...
and I get:
0: com.trifork.intrafoo.clj.extract_contacts
$extract_all.invoke(NO_SOURCE_FILE:1)
Locals:
pref = /Users/krukow/workspaces/trifork/intrafoo_clj/
contactdata/
cli = org.apache.commons.httpclient.httpcli...@6078b973
cs = ["411719" "413255" "413279"
In the repl I can hit ENTER:
nil
com.trifork.intrafoo.clj.extract-contacts>
Now typing pref gives an error:
Can't embed object in code, maybe print-dup not defined:
org.apache.commons.httpclient.httpcli...@6078b973
[Thrown class java.lang.RuntimeException]
Restarts:
0: [QUIT] Quit to the SLIME top level
1: [ABORT] ABORT to SLIME level 0
Backtrace:
0: clojure.lang.Compiler$ObjExpr.emitValue(Compiler.java:3871)
1: clojure.lang.Compiler$ObjExpr.emitConstants(Compiler.java:3909)
2: clojure.lang.Compiler$ObjExpr.compile(Compiler.java:3450)
Have you encountered something like this?
/Karl
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en