Fork me on GitHub

Hi all, I am wondering whether I need to do anything on top of adding #dbg before forms for Calva to debug...I read the manual and the caveats but the breakpoints don't seem to be hit


Hi. Can you provide an example that's not working for you?


yes I have a handler that it is never call and I am doing this in the function body

(let [..stuff...]

      (event-bus/publish event-bus (make-changed-event id)))


Are you evaluating the handler directly from the repl or calling it via http? The latter can be tricky to get breakpoints to work with I think, though I have done it before if I remember correctly.


It can be hard to debug these types of things without a solid repro case. If it involves hitting an endpoint via http, then if you could make a small repro project, that I can pull down and repro the issue with, and link it in an issue in the Calva repo, that would be best. There may be some trick to it that needs to be documented.


Yeah it is exactly hitting via http - not REPL, cause that's the use case the most devs want to do (cider user myself but debugging for others 🙂) In any case thanks for your help, repro case seems too much work for me at the moment, maybe later on


Ok, understood. This isn't the first time this has come up if I remember correctly, but I don't think we tracked it well before. I remember seeing it work, myself, but I don't try to do this in my usual work. I think this has something to do with how things are evaluated/loaded. If it works in Cider we should be able to make it work in Calva, since Calva uses cider-nrepl for much of its debugger functionality.


I made an issue for this so I can investigate soon. I'll try to repro myself. May ping you at a later date for more info or to test a change, if you're up for it. simple_smile


Please do, I am open to experimenting 😃


And thanks a lot!


Just as an FYI the code I inherited is a duct app with a pedestal http server...many moving parts I know

👍 3