0

I want to understand the startup of Clojure and the execution of a single form at the REPL of Cloujure.

Often, when possible, I use a debugger to step through the code to watch what is happening.

I think that I want to use jdb. It keeps failing with "could not find or load main class clojure", when I run "jdb clojure" and "stop in clojure.main" in ~/projects/clojure (where I've cloned the clojure repo).

Maybe I've got some path wrong, or I'm stopping on the wrong thing (maybe I need to stop on a name-mangled function?), or I've built clojure.jar without the pre-requisite debugging info, etc. The error message seems to say that I'm not starting things correctly.

I need a recipe for how to do this with clojure (.jar).

Assume that I know nothing about the java ecosystem.

  • Check https://stackoverflow.com/questions/2352020/debugging-in-clojure and http://blog.cognitect.com/blog/2017/6/5/repl-debugging-no-stacktrace-required Depending on your editor of choice, there may be plugins available that allow you to evaluate expressions in place too. – jmargolisvt Nov 17 '18 at 20:05
  • I like emacs cider: https://github.com/clojure-emacs/cider/blob/master/doc/debugging.md – Frank Henard Nov 18 '18 at 22:29

0 Answers0