Fork me on GitHub
#cursive
<
2020-02-11
>
kenny01:02:55

Is there a way to def a variable in the debugger?

kenny01:02:12

For example, say I'm paused here. Can I def the metrics variable, resume the program, and access my def'ed var in the regular REPL?

kenny01:02:49

FWIW, this is useful because working in a regular REPL is far nicer than working in the evaluate expression repl.

kenny01:02:39

Oh, maybe I can just def a variable using the evaluate expression repl 😯

kenny01:02:30

That worked! I think it'd be nice to have a button like REBL has for doing this sort of thing: https://raw.githubusercontent.com/cognitect-labs/REBL-distro/master/screenshot.png

dpsutton01:02:27

i think tap might work nicely here as well?

kenny02:02:36

Maybe? I haven't quite figured out how I'm supposed to use tap if I don't use REBL.

cfleming02:02:06

Yeah, I have some niceties around this planned for the debugger, including this and hopefully also keeping the normal REPL working but switching it to evaluate using the same mechanism as Evaluate Expression.

4
imre11:02:44

Why is Resolve ... as... -> Specify... -> clojure.core/comment not an option? There are some complicated macros in the codebase I'm currently working on and would like to disable static analysing the bodies of those.

cfleming21:02:41

Ugh, sorry, there was some discussion about this recently. There’s an issue, I’ve just moved this into the current milestone: https://github.com/cursive-ide/cursive/issues/1850

imre07:02:44

nice, thank you

imre11:02:21

when I try to enter clojure.core/comment, I get a var not found error

imre11:02:47

manually adding it to options/ClojureResolveSettings.xml doesn't seem to work either 😞

Ivan Koz14:02:50

I'm trying to debug shadow-cljs exception, which is being started by lein, and having an issue. Whats going on here? https://gyazo.com/feee3114d099052fe1fedb3522f35771.png https://gyazo.com/f8d7a6222af3087d61b5943ad7072ab6.png

cfleming21:02:05

I think what is going on is that Cursive uses trampoline internally, and you’re explicitly using it there. Does it work without that?

Ivan Koz23:02:20

@U0567Q30W sorry i was sleeping, let me check

cfleming23:02:46

No worries, I just realised after writing the message that I hadn’t pinged as requested.

Ivan Koz23:02:00

wow no way, i've tried every combination of trampoline arg and a checkbox, neither was working, but now it does as you said

Ivan Koz23:02:31

thank you ^^

cfleming23:02:04

No problem! The secret is that Cursive always uses trampoline to execute lein stuff.

cfleming23:02:54

Which I see is only sort-of documented here: https://cursive-ide.com/userguide/repl.html#local-repls

🙏 4
Ivan Koz14:02:18

i'm gonna run it directly for now, tag me if you have anything on that

sam17:02:43

I’m trying to “Use tools.deps directly”, but I can’t get it to download any versions of tools.deps. Clicking refresh has no effect. I tried looking in the idea log, but there don’t seem to be any relevant logs. Any idea what I’m doing wrong? Should I file a bug?

sam17:02:05

intellij version: 2019.3 Ultimate Cursive version: 1.9.0-2019.3

sam17:02:16

And I’m on a mac

sam21:02:45

I was able to workaround by using “use private repo” and pointing to maven central.

cfleming21:02:41

@UABEM258C This is a bug which is fixed in the latest EAP, there’s some description here: https://groups.google.com/d/topic/cursive/fItctBxneRk/discussion

cfleming21:02:04

I’m hoping to get this into a stable release soon, but 2020.1 threw a bit of a spanner in the works.

sam23:02:38

Okay, thanks for the info.