4

The Counterclockwise doco contains he following statement:

use the out-of-the-box Eclipse debugger possibilities to launch your launch configurations (Debug instead of Run

What you can currently do is being able to place breakpoints in clojure code edited either via the standard text editor

Which to me suggests usage of the eclipse stepping debugger. So I set up the following Clojure code:

   (ns ccwdebugtest)

   (def a 1)

X) (def b 2)

X) (def c 3)

X) (def d 4)

With debug points set at each of the points marked X) - I then chose to run the code via "Debug As > Clojure Application".

What I expected to get was a prompt to launch the debug mode of eclipse - instead a new REPL started up down the bottom.

When I typed in (println d) I get the result 4.

This tells me that my breakpoints failed to break at that point.

Are my expectations not valid? Am I doing something wrong?

(I'm running Eclipse Juno, with Java 1.7 on OS X 10.8.2 with CCW version 0.10.2.STABLE001)

hawkeye
  • 34,745
  • 30
  • 150
  • 304

1 Answers1

3

Not every Clojure line is compiled (by the Clojure compiler, nothing related to CCW / Eclipse here) with line information for debugging.

Try something like creating a function, and adding a breakpoint for a line containing an expression, e.g. (+ 2 3).

Laurent Petit
  • 1,201
  • 7
  • 12
  • Thanks Laurent - we really appreciate all your work on CCW. That did the trick. Would you mind confirming that you can't (yet) see the value of Clojure vars in the CCW debugger variable window? – hawkeye Dec 21 '12 at 04:35
  • @hawkeye - multiple years late to the party, but...I can confirm that as of the current version of CCW (0.35.1.STABLE001) Clojure variables *do* appear in the variable window. The catch is that to debug a Clojure app you can't start the debugger with Run-Debug or F11. Instead you need to right-click on the project name in the Package Explorer, click on Debug As, then click on Clojure Application. Best of luck. – Bob Jarvis - Слава Україні Jan 04 '17 at 03:53