The debugger works, but with some limitations. Breaking multiple times at a single breakpoint is one of them - as you say, you can have multiple expressions on a single line, and things that look like a single expression may expand into many if the form is a macro. If you haven’t seen it I spoke about these and other limitations at Clojure West this year.
The lein launched application doesn’t work at all unfortunately - this is because of the way leiningen works. What happens is that Cursive runs lein with a command, but lein internally starts a new process with the actual application. So Cursive ends up debugging the lein shim process, not the actual app, which is almost never what you want.
One thing that should work but that I haven’t tried would be to put the JVM args to start your app JVM in debug mode in your project.clj, and then connect to that with a remote debugger. Here’s how that would work:
- Create a “Remote” run configuration. The default config is probably fine.
- Copy the command line arguments from the supplied field and put them in :jvm-opts in your project.clj. If you’d like your app to wait for the connection on startup, set suspend=y.
- Run your app, and then connect the debugger to it with your remote run config.