This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-29
Channels
- # adventofcode (20)
- # announcements (6)
- # asami (13)
- # babashka (9)
- # beginners (80)
- # calva (53)
- # cider (16)
- # clj-kondo (24)
- # cljs-dev (40)
- # clojure (13)
- # clojure-australia (9)
- # clojure-europe (117)
- # clojure-india (3)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-sg (1)
- # clojure-spec (4)
- # clojure-uk (6)
- # clojurescript (6)
- # cursive (41)
- # datalog (5)
- # datomic (11)
- # emacs (9)
- # events (1)
- # fulcro (46)
- # integrant (31)
- # jobs (1)
- # kaocha (1)
- # lein-figwheel (3)
- # lsp (2)
- # meander (3)
- # missionary (4)
- # pathom (6)
- # portal (84)
- # re-frame (3)
- # remote-jobs (1)
- # reveal (2)
- # shadow-cljs (36)
- # tools-build (3)
- # xtdb (17)
So, I’ve been successfully using cider-debug-defun-at-point
to allow me to debug functions. However, I’ve been trying to set breakpoints at certain locations within a function to allow me to skip noisy sections. This works fine in a toy project.
(ns test-dbg.core)
(defn foo
"I don't do a whole lot."
[x]
#dbg (println x "Hello, World!"))
(foo 3)
But doesn’t work in my work project when debugging a http request.
(defn- return-something
[dep1 blah
#dbg
(when blah
The function evaluates successfully but the breakpoint doesn’t invoke the debugger. I’ve tried #break
too? What am I doing wrong?The function is not called from the repl, right? I had the same problem and my guess is that cider does not get an answer from the repl for asynchronous function calls and thus does not know of the execution of the function. But that's just a guess as I didn't have the time to look into the implementation yet.
Yeah, I recall there was some sporadic issue with async evals, but I think it was fixed a while ago.
@U02MWDCU3U6 before the function evals from a http request or instead of?
It looks like this still does not work as of cider-nrepl 0.28.5
? I mean starting to debug on an “asynchronous” call to a function marked for debugging (e.g. on an http request)?
Yeah, same REPL :thumbsup:
So, after further investigation, I can now use #dbg
in a function that I eval using C-x C-e
. However, this does not work if I eval the function using C-c C-k
which is what I was doing prior.