calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
zimablue 2021-06-25T06:43:51.312600Z

hi, I am trying the calva debugger: is there any way to put in a breakpoint without re-evaluating the specific form? for example if I jack-in, AFAICT the only way to get a breakpoint into a function somewhere is to reevaluate that function with #break in it, having #break in the source at the time of jacking in doesn't seem to work (?)

bringe 2021-06-25T19:49:24.313700Z

Well, loading a file will clear the breakpoints if they were set, and will not set them if they weren't set. As far as I know, a file needs to be loaded directly or indirectly (from another file that requires the namespace) after jack-in before you can evaluate calls to functions in the file. At this point an evaluation of the function with a #break is necessary to set the breakpoint after the load-file operation.

bringe 2021-06-25T19:50:29.313900Z

So, I don't think it's possible to have the breakpoints work right after jack-in, without evaluating the function with #break(s) in it.

bringe 2021-06-25T19:51:58.314100Z

However, if you start your repl outside of VS Code and connect to it instead of using jack-in, you won't need to set the breakpoints again after reconnecting, provided they were still set from the last time you worked in that repl.

bringe 2021-06-25T19:52:29.314300Z

And you don't load the file after reconnecting, before trying to hit the breakpoints again.

bringe 2021-06-25T19:54:55.314500Z

An easy way to start a repl the same way as jack-in does is to run the command "Copy Jack-in Command to Clipboard" while your project is open, make the menu selections you would make for jack-in, then paste the command into a terminal outside of VS Code and run it. Then you can run the Calva command to connect to that repl each time you want to work in that project, provided you haven't closed that terminal or restarted your machine.

zimablue 2021-06-26T03:16:04.316800Z

thanks a lot for this help

zimablue 2021-06-26T03:17:11.317Z

so what you're saying is if I understand: "no", but a workaround which can give a smoother workflow is to maintain a persistent REPL so that this calva-evaluation only has to happen once

zimablue 2021-06-26T03:18:08.317200Z

is this a design choice or due to some limitation? Do other tools like Emacs or Calva allow loading a file with existing breakpoints and jumping straight in?

bringe 2021-06-26T23:57:33.318500Z

You're welcome. Yes, you understand correctly. Calva's debugger uses functionality from cider-nrepl, which Emacs/Cider uses, and I believe Cider has the same limitation.

pez 2021-06-25T18:34:05.313300Z

Sweet deref! https://clojure.org/news/2021/06/25/deref

❤️ 4
🎉 1
bringe 2021-06-25T20:10:25.315100Z

CC @ericdallo :simple_smile:

ericdallo 2021-06-25T20:25:54.315300Z

That's awesome! 😄

2
☝️ 1
bringe 2021-06-25T20:31:51.315800Z

I agree!