Fork me on GitHub

Hi 1- I installed calva on vscode 2- I run my project ( with lein run In debug section of vscode there is no any suggestions for creating launch.json file for calva debugging and I have no idea how to attach and use debugger! I checked out, but I didn't find any clue I would be grateful for any helps 🙏


Hi, @kalantar98. Welcome! Calva’s debugger need Calva to be connected to the REPL in your application. You can read about this here: I suggest you start with familiarising yourself with Calva’s REPL connection. There is a command in Calva that helps you with this, and that also has a brief intro to the debugger. You find it in the VS Code command palette: Fire up the Getting Started REPL.

👍 3

Here you can read a bit about the getting started guide, there is a video introducing it as well:

👍 3

Thank you very much


You are welcome!


I have never tried the metabase project in Calva. Curious about how that pans out. Please don’t hesitate to ask for help here.


I am really thankful I am an android developer for almost more than 3 years, and this is my first experience with lisp langs, I was struggling for 4 days to set up debugger in this project I was totally desperate, Thanks again for helping 🌹


Just a heads up. The debugger only works in Clojure. For ClojureScript there is no debugger.


Ok thanks! metabse backend is just Clojure


Personally, I don’t use the debugger very often. The Clojure REPL provides alternatives that for the most times suffices. Having the editor plugged in to the running application is quite different, and much more powerful, from anything I had previously experienced.


Oh cool, seems like I should learn more about REPL but does this editor plugging has features of a debugger like pausing at some specific line of code, or navigating through callstack?


If you have instrumented the code, the execution will pause at the breakpoint. There is no navigation through callstack, though. The existing features are listed on the debug docs page.

💯 3

Thank you again


Hi Sajjad, I would be very interested in your experiences in getting up and running with Metabase. I hope you can make some notes and collect them into a blog- or wiki-entry for fellow-beginners to learn from. Good luck!


@UFLE01UV8 That's a good idea, I am trying my best to set up this weird debug system for metabase 😂


I know virtually nothing about Metabase; considering if we can use it when in the long run we have access to the database from our vendor. Meanwhile, I'd like to practice using .csv files, but the support for that is still rather weak. I hope to be able to help improve that. (someday)

👍 3

Hey @kalantar98. I added the debugger support to Calva. If you have any issues or questions feel free to direct them my way. Your experience makes me realize we could improve those docs a bit more to inform newcomers better about how the debugger differs from what they might be used to (no launch.json or manual starting of the debugger). I'll create an issue to remember to do that. I agree with @U0ETXRFEW that getting more familiar with the repl would be good to do first.

👍 3

I've added a note about this to the docs: Thanks @kalantar98 for the feedback

👍 3

@U9A1RLFNV Note was useful, Thanks

👍 3

Hi @U9A1RLFNV I’ve tried doing this:

(deftest create-restaurant-test
  (testing "create restaurant & fetch restaurant"
    (let [restaurant (assoc restaurant :bicycle-info {})
          booking (dissoc booking :bicycle-id :bicycle-name :bicycle-photo-url :bicycle-phone)]
      #break (restaurant/create booking)
      (is (= restaurant (-> (restaurant/fetch restaurant-number)
                       (dissoc :updated-at :created-at :restaurant-created-at :restaurant-updated-at)))))))
If I do > calva run current test, it does not stop at the breakpoint ;\ . Is this expected, or is this not the clojure way to debug test ?


Hey @U020A902CSH. The reason for this, and how to make it work, is explained in the docs here:

👍 4

@U0ETXRFEW Maybe we could load file -> eval top-level form (current test) -> run test - I think the eval after load would ensure the function is instrumented before it's run, same as the manual instructions in the docs. What do you think? It might look odd though seeing the eval decorations and annotations before the test runs, but maybe we could disable that in this case.


Hello! I’m new to Clojure & Calva. I’m going through “fire up the getting started repl” and trying to eval the form up to the curser (ctrl+alt+enter). When I try it, on L110 of hello_repl.clj, nothing seems to happen. I place my cursor after colt-express, for example or after :ratings. When I do ctrl+alt+enter, should I see any output? I’m on a MacBook Pro. Thanks!


@jeffmcompsci maybe some other extension is also binding something to that shortcut? Or something else system level.


This should happen.


Does repl show as connected at bottom?