Fork me on GitHub
#emacs
<
2017-09-27
>
qle-guen09:09:28

is there a way to put a breakpoint on a specific sexp instead of the wole defn ?

jumar10:09:52

@qle-guen I always used only cider-debug-defun-at-point but I guess you can use #break or #dbg: https://cider.readthedocs.io/en/latest/debugging/

qle-guen11:09:15

@jumar yes but for some reason that doesn't break anything

jumar12:09:49

well, it seems to work for me:

(defn my-fn [x y]
  #break (println "x and y are: " x y)
  #dbg (let [z (+ x y)]
    (dotimes [i 10]
      (println "some side effects: " i))
    (println "z is: " z)))

(my-fn 10 20)
Disclaimer: I use Spacemacs

qle-guen12:09:26

I use spacemacs too

qle-guen12:09:31

and it's kinda annoying because it messes with parinfer

qle-guen12:09:44

anyway there should be a way to debug a sexp with emacs

qle-guen12:09:44

anybody knows how to remove a breakpoint created by cider-debug-defun-at-point?

dpsutton12:09:42

just re-evaluate the form