It works! Thank you so much for looking into this! I really appreciate what
you have done.

I went through the rest of the documentation and found three other minor
misnomers.

One, if you set a breakpoint on a function defined in the repl, you'll have
problems. As long as anything you set a breakpoint on is defined in a
clojure source file, one should be fine.

Two, set-catch does not appear to take clojure error objects:
user=> (set-catch clojure.lang.ArityException :all)
IllegalArgumentException No reference type found for class
clojure.lang.ArityException  cdt.events/set-catch (events.clj:326)
set-catch does take java error objects though. I haven't tested this yet.

Three, locals does not appear to work.
user=> (locals (ct) (cf))
RuntimeException Unreadable form  clojure.lang.Util.runtimeException
(Util.java:156)

Thank you again for writing CDT! It is a life saver.

On Thu, Feb 9, 2012 at 12:16 AM, George Jahad
<cloj...@blackbirdsystems.net>wrote:

> Sorry about that.  As you noticed the doc here was out of date:
>
> http://georgejahad.com/clojure/cdt.html
>
> It should be fixed now.
>
> Just for your reference however that doc only describes the command
> line version of CDT.  If you use Emacs and Swank-clojure, it is much
> easier to use swank-cdt, as your UI:
>
> http://georgejahad.com/clojure/swank-cdt.html
>
>
>
> On Feb 8, 11:11 am, Sean Neilan <sneil...@gmail.com> wrote:
> > Hi All,
> >
> > I'm using Clojure 1.3.0 with CDT 1.2.6.2 on OSX Lion with Java 1.6.
> >
> > I want to set a breakpoint on -main on the program to be debugged. So,
> > run lein repl on this program. It opens up port 8030 successfully.
> > (This is based off the documentation here:
> http://georgejahad.com/clojure/cdt.html)
> > seans-macaroni-book:gslisp seanneilan$ lein repl
> > Listening for transport dt_socket at address: 8030
> > REPL started; server listening on localhost port 13575
> >
> > Then, I start up a new shell in a different project and do this to
> > attach to the program to be debugged:
> > seans-macaroni-book:cdt seanneilan$ lein repl
> > REPL started; server listening on localhost port 57048
> > user=> (use 'cdt.ui)
> > nil
> > user=> (cdt-attach 8030)
> > nil
> > user=> CDT ready
> >
> > It attaches correctly. Then, I set the breakpoint on -main
> > user=> (set-bp gslisp.core/-main)
> > bp set on (#<LocationImpl gslisp.core$_main:240>)
> > nil
> >
> > Then, in the other shell, I call -main
> > gslisp.core=> (-main)
> > which correctly stalls
> >
> > In the debugger shell, I see
> > user=> Breakpoint #<BreakpointEventImpl breakpointev...@gslisp.core
> > $_main:240 in thread Thread-2> hit
> > CDT location is /Users/seanneilan/BucketsOfNantucket/research/gslisp/
> > src/gslisp/core.clj:240:0:
> >
> > But, if I try to type any debugging commands, I get this:
> > user=> (locals)
> > ArityException Wrong number of args (0) passed to: reval$locals
> > clojure.lang.AFn.throwArity (AFn.java:437)
> > user=> (up)
> > ArityException Wrong number of args (0) passed to: ui$up
> > clojure.lang.AFn.throwArity (AFn.java:437)
> > user=> (down)
> > ArityException Wrong number of args (0) passed to: ui$down
> > clojure.lang.AFn.throwArity (AFn.java:437)
> > user=> (up 1)
> > ArityException Wrong number of args (1) passed to: ui$up
> > clojure.lang.AFn.throwArity (AFn.java:437)
> > user=> (up 0 0)
> > IllegalArgumentException No matching field found: frames for class
> > java.lang.Long  clojure.lang.Reflector.getInstanceField
> > (Reflector.java:289)
> > user=> (print-frames)
> > ArityException Wrong number of args (0) passed to: ui$print-frames
> > clojure.lang.AFn.throwArity (AFn.java:437)
> > user=> (cont)
> > CompilerException java.lang.RuntimeException: Unable to resolve
> > symbol: cont in this context, compiling:(NO_SOURCE_PATH:20)
> >
> > So basically the breakpoint hits but I can't run any debugging
> > commands.
>
> --
> 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 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

Reply via email to