Fork me on GitHub

I'm running the debugger and have a function like this:

(defn foo
  (+ x "as"))
When I run (foo 1) in the repl I get a ClassCastException thrown. I have Java Exception Breakpoints > Any exception checked. And a notification for only Uncaught exceptions (the caught exception is unchecked). The debugger does not pause on the ClassCastException with this configuration. Is this expected?


No, that should work. If you switch to catching caught exceptions too does that stop?


Yes. It also stops at a bunch of other places.


Hmm, that’s probably because the REPL will catch all exceptions to do error handling, and the debugger knows that.


Could you file an issue about that? I’m not sure I’ll be able to fix that but I’ll try.


Ok. Will do tomorrow.


Do people typically start their REPL in "debug" mode so you don't need to restart your REPL to activate it when you need it?


I don’t always start a REPL (depends what I’m working on, it’s not always possible/useful), but I always start my app in debug mode, yes.


There’s very little downside. The main problem is that I’ve found that it can greatly increase memory consumption on the launching IDE, but not always.


I think I'll start doing that! I only found myself reaching for the debugger in dire situations because it required a REPL restart, having always started a REPL in "run" mode. For some reason I assumed there was some downside to starting in debug mode.


@potetm It took a while to get this right, but:

(iterate (fn [_] (throw (RuntimeException.))) 0)
Error printing return value at user/eval349$fn (NO_SOURCE_FILE:2).
(with the socket REPL)

aw_yeah 4