This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-09
Channels
- # announcements (1)
- # babashka (14)
- # calva (8)
- # chlorine-clover (3)
- # clerk (6)
- # clj-kondo (27)
- # cljdoc (20)
- # clojars (6)
- # clojure (53)
- # clojure-denver (8)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-norway (270)
- # clojure-uk (5)
- # clojurescript (35)
- # community-development (7)
- # cursive (12)
- # datalevin (3)
- # datomic (26)
- # etaoin (23)
- # exercism (1)
- # hyperfiddle (3)
- # java (14)
- # nrepl (2)
- # off-topic (12)
- # pathom (3)
- # portal (44)
- # practicalli (2)
- # reagent (7)
- # releases (1)
- # shadow-cljs (13)
- # timbre (3)
- # xtdb (4)
When evaluating a form in a Cursive REPL in Debug mode, and that form throws an exception, I would expect the debugger to show me the call stack (as it does when I set a breakpoint). But instead, all it does is print a textual description of the exception on the REPL. How can I get the debugger to show the call stack?
Thanks! Those are useful. What I am looking for though is to have this shown in the IntelliJ debugger and be able to navigate the stack, inspect local variables in each frame etc like in the screenshot. Is this possible? If not, can I extract the same information from this *e
object somehow?
I think you can use this feature: https://www.jetbrains.com/help/idea/analyzing-external-stacktraces.html
I’m not sure you can analyze the runtime state of a stack trace in an Exceptuon though…
I guess what I am after is functionality like this one from PyCharm. This happens automatically whenever an exception is raised and I am in debug mode.
That looks like Exception Breakpoints: https://www.jetbrains.com/help/idea/using-breakpoints.html#exception-breakpoints
Great! This is what I was looking for.
Still have to figure out how to use this well. If I configure this to show me "caught" exceptions as well, there is an unusable amount of noise. But if I set it to only show me "uncaught" exceptions, it won't trigger when I evaluate forms in the REPL. So apparently I have to set appropriate "catch class filters" in this dialog. I have gotten as far as figuring out that the pattern clojure.lang.*
is what makes the difference - but unfortunately it affects both the noise as well as the exceptions that bubble up to the REPL. Any advice for how to capture exactly those exceptions that "would be caught in such a manner so that a stack trace is printed on the repl" would be super useful.
The dialog I was referring to:
after some experimentation, best setting I found for the REPL use-case is to set the "catch class filter" to the class clojure.lang.Compiler