I’ve updated this PR now. Grab new VSIX from CircleCI if you want something a bit saner than that ^ one.
Hi, I’m facing issues when trying to use debugger. I get a No reader function
. Example:
(defn xx [x y]
(+ x y))
ctrl+alt+c i
; Syntax error reading source at (REPL:113:11).
; No reader function for tag dbg
I get No reader function for tag dbg/break when trying to use the debugger.
What could I be doing wrong?@mail.acharyarahul.now How are you starting the REPL?
I lein reload
to start the service, which starts a REPL at a port. I then Calva-jack-in and specify the port number to connect. The REPL operations themselves have been working well.
I think you mean Calva connect? (jack-in, is a bit of a misnomer, so easy to mix up). Anyway, with jack-in Calva can ensure that its dependencies are satisfied. My wild guess here is that there is some dependency issue. There is a command named something like Copy Jack-in command to clipboard. You can use it to see how Calva would start your project. Then choose wether you want to also use the command line to add the Calva dependencies or if you want to update you project. I think it might solve the problem you have.
@mail.acharyarahul.now What @pez said sounds correct. I added a section to the docs just now about this: https://calva.io/debugger/#no-reader-function-for-tag-error. Hopefully this helps solve your issue, but if not let us know.
Hi, When I try to jack-in it stucks here, does anyone have idea how to fix that? (in the bottom-left corner I am getting "Launching REPL using leiningen")
What does it say in the Jack-in Terminal?
lein update-in :dependencies conj '[nrepl,"0.8.3"]' -- update-in :plugins conj '[cider/cider-nrepl,"0.25.8"]' -- update-in '[:repl-options,:nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +uberjar repl :headless
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
I noticed that I can connect to "Getting Started" repl, but can't connect via jack-in option
Very strange. It really is stuck. Is it a new project? If you run that command from the terminal manually, what happens then?
What Calva is waiting for is a message announcing that the nREPL server is started.
it's not a new project, it was working a day before 😕
I had VSCode upgraded and I changed some keybindings, but apart from that I didn't tweak anything from previous setup
yes, firing the same command from terminal also getting stuck
Try without the uberjar
profile. Maybe you have a dev
profile?
tried with dev profile, that's also getting stuck
How about just lein repl
?
yup, that also getting stuck
I ran lein test
which worked after some initial delay, then tried lein repl
which worked, and now I can even jack-in!
Something needed to be cleaned out. Happy it is working again!
right, thanks a lot for your time!
You are welcome! Please consider filing a review on Calva, if you haven’t already. Link in the channel topic. ❤️
sure, will do!
That does seem to work for debugging local clojure files 😄
But when I jack in, the config is not loaded, and rightly so, because it doesn’t know what/where to load it from as it’s an external edn file that is read from within the code (and I am not sure how to specify it exactly).
The way I’ve been working has been to do a lein reload
and then do the
Connect to a running REPL server in your project
and specify the port number of the running REPL. And things work as expected in the REPL ~ this way the config is loaded. Now only if I could get the debugger also working in the same flow, that would help. I’ll have to figure out how to read config during jack-in in the project.
cc:// @pez @charliebriggs
Interesting. I'm not familiar with lein reload. If you want to provide a repo with the project or a similar project we could look at, we may be able to help you better. It does seem like you need to add the proper dependencies to the repl you are starting, though.