Fork me on GitHub
#cider
<
2020-01-27
>
anonimitoraf11:01:43

Is #break or #dbg still supposed to work? Because it doesnt for me. Using spacemacs btw

anonimitoraf11:01:15

I can start a debug session fine, can step through each line of code, etc. But, using continue doesnt stop on my #break statements

practicalli-johnny17:01:42

@nicdaoraf are you using c or C to continue? They skip over current / all breakpoints respectively. I usually walk through with n for next and o if I want to skip over anything, like a lazy sequence. In Spacemacs you can use , d b or M-RET d b instead of #dbg . Just re-evaluate the expression when you want to clear the debug breakpoints. I have not used #dbg or #break explicitly.

anonimitoraf06:01:54

Oh right, yea I use , d b to start the debug session and also n or o to go through lines/blocks. But it's pretty inconvenient when you have a lot of lines of code. Can you try using #dbg or #break and see if it works for you?

jumar06:01:05

I use it very rarely (#dbg) but I think you need to just "eval" the expression (functional call) and don't instrument the function explicitly (otherwise it will include breakpoints all over the place and you won't get the desired behavior. When I do this (without calling `cider-debug-defun-at-point) it (sort of) works:

(defn test  [x]
  (println x)
  (inc x)
  (inc (#dbg ^{:break/when true} inc x)))

(test 2)
But it only stops at the given expression, it seems you cannot step-by-step after that.

yuhan07:01:50

I use both #dbg and #break pretty frequently and they're working fine for me - as far as I understand, only the tagged form is instrumented, so you can't "step outside" of it

anonimitoraf20:01:29

@U06BE1L6T How do you just "eval" without instrumenting? @UCPS050BV Right, as a later post in the channel sugfested, I took a look at the docs and apparently there are interesting and non-interesting forms(?) so maybe I should just have a play around with where I place #break or #dbg

jumar08:01:33

@U0B1V8NLU put #dbg inside the function body and then cider-eval-defun-at-point. After that you can call the function and evaluation should stop at the breakpoint.

mikerod21:01:36

Encountering a case where most of my *out* is going only to *nrepl-server X* buffer instead of showing up in the repl with cider-version 0.24.0snapshot

mikerod21:01:53

does anyone know what causes that situation? I’m only seeing some really old cider issues that discuss similar things - way out of date

mikerod21:01:22

basically, I can just put a println in a fn body and call that fn and not see the output

mikerod21:01:45

trying to figure out how to even narrow down where to look at this point

mikerod21:01:06

I do see the out middleware being loaded on startup

mikerod23:01:43

must have had some env issues because after a clean of everything and cider restart I’m getting output to my client repl buffers now again - woops