Elephant in the room: Sayid. It's made for Emacs, and it's so powerful, you may want to switch to Emacs just because of it.
Debugging in Clojure
11–20 of 28 posts
Re: Debugging in Clojure
#12Re: Debugging in Clojure
#13Could `scope-capture` be used to capture state before a crash? What would be nice is a GDB-like state along with stacktraces when you get a crash. Clojure stack traces are notoriously long and spooky. You learn to read the tea leaves, but even if you manage to identify where the crash happened and what triggered it (not always obvious..) you then need to pepper things with `println` to figure out the last local state…
Re: Debugging in Clojure
#14This isn’t mentioned in the article, but I found debug-repl [1] to be amazing when debugging in the repl. For simple prints, wrapping expressions in (doto prn) has always been enough for me without custom readers. But when debugging something super odd, just stopping somewhere and evaluating a bunch of code (with locals in scope) to understand what you’re dealing with is invaluable. Clojure’s immutability makes it es…
Re: Debugging in Clojure
#15The first example about spyscope potentially confuses the reader a bit by using it in context of println debugging. The point of it is you can stick it in front of any form. For a better example, see https://github.com/dgrnbrg/spyscope#spyp Otherwise great article, I hadn't heard about scope-capture.
Re: Debugging in Clojure
#16Does the Clojure debugger give a live Repl, where one can examine values of locals and restart execution if required, likes the elisp debugger in Emacs?
However, as I mentioned in the article, I've found it's usually better to use scope-capture than a debugger that pauses execution. The main reason is that I mainly work with Kafka Streams atm, and when the debugger pauses one thread other threads start timing out and throwing exceptions.
Re: Debugging in Clojure
#17For people who want to get a more CL-like debugging setup on Clojure, there is a CL-style condition system available as a library. https://github.com/IGJoshua/farolero/
Re: Debugging in Clojure
#18Does the Clojure debugger give a live Repl, where one can examine values of locals and restart execution if required, likes the elisp debugger in Emacs?
Cursive's debugger doesn't, but as one of the other posters mentioned there's a library called debug-repl which gives you this: https://github.com/gfredericks/debug-repl . However, as I mentioned in the article, I've found it's usually better to use scope-capture than a debugger that pauses execution. The main reason is that I mainly work with Kafka Streams atm, and when the debugger pauses one thread other threads s…
Re: Debugging in Clojure
#19Earlier quoted context omitted.
Cursive's debugger doesn't, but as one of the other posters mentioned there's a library called debug-repl which gives you this: https://github.com/gfredericks/debug-repl . However, as I mentioned in the article, I've found it's usually better to use scope-capture than a debugger that pauses execution. The main reason is that I mainly work with Kafka Streams atm, and when the debugger pauses one thread other threads s…
That seems to give a repl at a breakpoint, I was asking about getting a repl at a point of exception. That is what elisp gives.
Re: Debugging in Clojure
#20Does the Clojure debugger give a live Repl, where one can examine values of locals and restart execution if required, likes the elisp debugger in Emacs?
Cursive's debugger doesn't, but as one of the other posters mentioned there's a library called debug-repl which gives you this: https://github.com/gfredericks/debug-repl . However, as I mentioned in the article, I've found it's usually better to use scope-capture than a debugger that pauses execution. The main reason is that I mainly work with Kafka Streams atm, and when the debugger pauses one thread other threads s…
It's a normal step debugger, and you can run new expressions in context are we talking about lisp restarts?