Fork me on GitHub
#cider
<
2021-11-19
>
eval-on-point13:11:49

is there an example somewhere showing how to use the "step in" function of the debugger? I can't seem to get it to work the way I would expect. In the below example, I would expect the debugger to allow me to step through the plus1 function if I step in, but for some reason it does not behave any differently from just stepping with "next".

(defn plus1 [x]
  (+ 1 x))
#dbg
(defn add-one [x]
  (plus1 x))

(add-one 2)

practicalli-johnny16:11:36

Add debugging on the plus1 function as well, otherwise it will just return the result when called from add-one

eval-on-point18:11:12

ah, so what is the point of step in? I supposed that it would instrument the next function-to-be-called for me

jumar14:12:42

I'm not sure about this particular example but step-in typically works as expected and you don't need to instrument the function you want to "step in". In this case, it might be that the implementation of plus1 is so trivial (perhaps combined with it using clojure.core/+ fn? ) there's no place in it to step in