Debugging Clojure with IntelliJ Idea 10 and La Closure Plugin version 0.3.15
clojure, debugging, intellij-idea
Solution
I'm using Clojure 1.3 (built from github sources), LaClojure 0.3.74, and Sun Java 6u24 running on IDEA 10.0.3. My breakpoints seem to work as advertised (getting checkmarks in red dots), although you will get x's on breakpoints at non-evaluative code such as [] vs. function_name[]. For example:
(ns clojure.examples.hello
(:gen-class))
(defn hello <---- Get check breakpoints here.
[] <---- Get x breakpoints here, can't eval [] but hello[] is okay!!!
(let [a 12
b (/ a 2) <---- Get check breakpoints here.
c (* b 3)]
(if (< b a)
(println (str b "<" a)) <---- Get check breakpoints here.
(println (str a "<" b)))))
You might want to upgrade to the latest version of IDEA/LaClojure (Java 6uX and Clojure 1.2 should work fine), make sure IDEA knows where to find your clojure jars and which jdk to use (sounds like you know how to config a usable IDEA setup, so you're good there), and make sure you have bp's only in expressions that can be evaluated.
Problem
I'm using IntelliJ Idea 10 with the La Closure plugin version 0.3.15 and Java 6 I've added Clojure 1.2 to a project. The breakpoints I put on Java code get hit, but the ones I put on Clojure do not. in fact, if the debugger is stopped on a Java breakpoint, the breakpoints on Clojure code have an x in them and they have a warning that says, for example, No executable code found at line 4 in class at debugland$eval3. I've tried putting breakpoints in Clojure core functions like println, but I still get the red x's. Would really, really appreciate any help on this. I've tried Idea 9 with both Clojure 1.1 and 1.2 with similar results.