Fork me on GitHub
#calva
<
2020-10-02
>
Tom H.02:10:03

Hi folks, I’m having some trouble getting the debugger to work in our project

Tom H.02:10:29

I’m not able to use jack-in as I have a lot of environment vars that we’re using direnv to manage

Tom H.02:10:43

So I’ve tried copying the lein command used by jack in like so:

Tom H.02:10:02

lein update-in :dependencies conj '[nrepl"0.6.0"]' -- update-in :dependencies conj '[clj-kondo"2020.04.05"]' -- update-in :plugins conj '[cider/cider-nrepl"0.23.0"]' -- update-in '[:repl-options :nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +dev repl :headless

Tom H.02:10:00

I can connect using the “generic” nrepl option but I get a lot of errors like this is my terminal afterwards:

Tom H.02:10:04

java.lang.NullPointerException: Cannot invoke "jdk.javadoc.internal.doclets.formats.html.HtmlConfiguration.getOptions()" because "this.configuration" is null
        at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.getSupportedOptions(HtmlDoclet.java:292)
        at jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.getSupportedOptions(StandardDoclet.java:93)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$parse_java$reify__47394.getSupportedOptions(parser.clj:77)
        at jdk.javadoc/jdk.javadoc.internal.tool.Start.getSupportedOptionsOf(Start.java:645)
        at jdk.javadoc/jdk.javadoc.internal.tool.Start.consumeDocletOption(Start.java:593)
        at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseArgs(Start.java:799)
        at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:497)
        at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:399)
        at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:361)
        at jdk.javadoc/jdk.javadoc.internal.api.JavadocTaskImpl.call(JavadocTaskImpl.java:104)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$parse_java.invokeStatic(parser.clj:87)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$parse_java.invoke(parser.clj:64)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$source_info.invokeStatic(parser.clj:299)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$source_info.invoke(parser.clj:290)
        at clojure.lang.Var.invoke(Var.java:384)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info_STAR_.invokeStatic(java.clj:196)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info_STAR_.invoke(java.clj:187)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info.invokeStatic(java.clj:234)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info.invoke(java.clj:226)
        at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$eval47613$fn__47614.invoke(java.clj:376)
        at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:832)

Tom H.02:10:49

I can execute forms in the editor but it seems to ignore #break points

Tom H.02:10:37

actually, I may have just misunderstood how breakpoints work..

Tom H.02:10:08

Is it that breakpoints only work inside of an instrumented form?

Tom H.02:10:25

Apologies for the false alarm, the answer to my issue was in “My breakpoint isn’t being hit” here: https://calva.io/debugger/

🎉 3
Tom H.02:10:34

I was breakpointing on a number literal 🙂

pez06:10:07

Glad you figured it out, @tomisme. 😃 On the jack-in issue, you might get away with starting code from that directory.

Tom H.06:10:51

ahh yeah I see, using code on the commandline

Tom H.06:10:49

Yep that seems to have worked 🙂 thanks!

metal 6