This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-25
Channels
- # announcements (2)
- # asami (16)
- # babashka (55)
- # beginners (27)
- # calva (14)
- # cider (5)
- # clj-kondo (16)
- # cljs-dev (22)
- # clojure (72)
- # clojure-europe (89)
- # clojure-nl (10)
- # clojure-uk (7)
- # clojured (1)
- # clojurescript (14)
- # community-development (4)
- # core-async (15)
- # emacs (10)
- # events (2)
- # fulcro (3)
- # graalvm (1)
- # graalvm-mobile (71)
- # helix (7)
- # honeysql (2)
- # introduce-yourself (1)
- # jobs-discuss (17)
- # juxt (3)
- # lsp (62)
- # malli (13)
- # meander (7)
- # off-topic (14)
- # pathom (54)
- # polylith (6)
- # re-frame (11)
- # releases (1)
- # sci (22)
- # sql (9)
- # tools-deps (84)
- # vim (37)
- # xtdb (18)
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 (?)
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.
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.
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.
And you don't load the file after reconnecting, before trying to hit the breakpoints again.
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.
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
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?