Fork me on GitHub
#calva
<
2021-03-11
>
0xclj12:03:21

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?

pez12:03:08

@mail.acharyarahul.now How are you starting the REPL?

0xclj12:03:36

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.

pez12:03:43

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.

bringe17:03:41

@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.

0xclj22:03:28

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 @U7L6VDLTZ

bringe22:03:59

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.

Pratik17:03:16

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")

pez17:03:45

What does it say in the Jack-in Terminal?

Pratik17:03:06

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.

Pratik17:03:19

I noticed that I can connect to "Getting Started" repl, but can't connect via jack-in option

pez18:03:40

Very strange. It really is stuck. Is it a new project? If you run that command from the terminal manually, what happens then?

pez18:03:39

What Calva is waiting for is a message announcing that the nREPL server is started.

Pratik18:03:41

it's not a new project, it was working a day before 😕

Pratik18:03:38

I had VSCode upgraded and I changed some keybindings, but apart from that I didn't tweak anything from previous setup

Pratik18:03:58

yes, firing the same command from terminal also getting stuck

pez18:03:56

Try without the uberjar profile. Maybe you have a dev profile?

Pratik18:03:13

tried with dev profile, that's also getting stuck

pez18:03:32

How about just lein repl?

Pratik18:03:37

yup, that also getting stuck

Pratik18:03:54

I ran lein test which worked after some initial delay, then tried lein repl which worked, and now I can even jack-in!

pez18:03:39

Something needed to be cleaned out. Happy it is working again!

Pratik18:03:00

right, thanks a lot for your time!

pez18:03:23

You are welcome! Please consider filing a review on Calva, if you haven’t already. Link in the channel topic. ❤️

Pratik18:03:36

sure, will do!

calva 1