Welcome! Please see the About page for a little more info on how this works.

0 votes
in Compiler by

Hello all,

Is there a recommended way to work on the Clojure sources, both the java and the clj files?

For example, I'd like to be able to put a breakpoint in my ide (Intellij Idea) to see how certain parts of the compiler or the core libraries work.

Thanks

2 Answers

+2 votes
by

I use Cursive for this. It does take a bit of care to set up. You need to make sure that src/jvm is marked as a source folder, and src/clj and src/resources are marked as resource folders.

When you create the run configuration, don't use Clojure REPL, just use a normal Application and configure it with a Main Class of clojure.main and use the project classpath. Then you run that config in Debug and you can set breakpoints as needed (in both Clojure and Java source).

by
It works perfectly, thanks Alex!
0 votes
by

You should be able to do that just fine with the Cursive plugin.

...