Fork me on GitHub
#cursive
<
2017-05-22
>
tcarls01:05:02

@cfleming, thank you -- I'll take notes next time I give it a try.

denik17:05:45

Recent Files (cmd + E) pops up with 3-8 seconds delay for me. Whereas Recently Edited Files shows up instantly. I understand the latter is a subset of the former. Is there any way to speed up Recent Files?

denik17:05:14

Navigate by namespace includes namespaces of all required deps. Is there a way to limit it to the project namespaces?

wilkerlucio18:05:34

one example stack for the case 👆

timgilbert20:05:00

Say, is there a command for "re-indent surrounding form" that I could bind to a key? Currently I'm putting extraneous ) characters on a line by themselves to do so, but it's kind of goofy

timgilbert20:05:29

...ah, got it, command-option-L does that very thing

kenny21:05:38

I don't understand how the REPL debug button is supposed to work. I'll write a function and create a breakpoint demonstrated below:

(defn my-add
  [x y]
  (+ x y))   ; <-- breakpoint here
Then I click the debug mode button in the REPL pane and execute this form:
(my-add 1 2)
And nothing happens. I'd expect that the breakpoint would be hit and I'd be taken into the usual breakpoint UI. Am I doing something wrong?

cfleming22:05:22

@kenny That button doesn’t start the debugger. For the debugger to start, you have to run your REPL configuration in debug mode (so Run-&gt;Debug &lt;whatever&gt; rather than Run-&gt;Run &lt;whatever&gt;).

cfleming22:05:41

What that button does is control locals clearing, which is very confusing.

kenny22:05:30

Hmm. It still doesn't seem to work. Will it work with a remote REPL?

cfleming22:05:52

It should work with a lein REPL too. Does your breakpoint have a check mark in it?

kenny22:05:12

No. Just a red dot.

cfleming22:05:24

Is the namespace loaded into the REPL?

cfleming22:05:44

I’m actually seeing that as well.

cfleming22:05:54

I wonder if the debugger is broken in the latest EAP.

kenny22:05:18

Seems like it. You'd know best 🙂

cfleming22:05:35

Thanks, I’ll take a look.

cfleming22:05:48

I’m pretty sure it works in the previous EAP if you need it, I’ve used it recently.

kenny22:05:37

I don't need it per say. It'd just be a big time saver 🙂

cfleming23:05:02

Hehe. Well, as long as you don’t need anything from the latest EAP, downgrading should be safe I think.

kenny23:05:15

Ok cool. I'll try that out in a minute.

kenny23:05:33

@cfleming Still doesn't work with 1.5.1-eap1-2017.1

cfleming23:05:26

That’s odd, I can’t see anything that would have affected the debugger in either release.

cfleming23:05:30

I’ll check it out now.

kenny23:05:05

Here's exactly what I'm doing: 1. Create remote REPL with "Use Leiningen REPL port selected 2. Run boot repl in the command line in my project 3. Run &gt; Debug... &gt; &lt;name of previously created run config&gt; &gt; Run. This opens the REPL pane. 4. Add breakpoint inside my function 5. Load my namespace in the REPL 6. Switch to my namespace 7. Run my function

cfleming23:05:32

@kenny Actually, my problem was just stupid user error.

cfleming23:05:51

It does work for me.

cfleming23:05:27

If you’re running your REPL externally, then you’ll need to connect the remote debugger to the JVM.

cfleming23:05:08

So there are three steps - start your process in debug mode using the Java opts specified there, then connect your remote debugger, then connect your remote REPL.

kenny23:05:28

Ok. I'll try that now

kenny23:05:14

@cfleming I'm not sure where this section is: > 'IntelliJ/Run/Edit configurations.../Defaults/Remote' and adjust the Settings section accordingly, using port 5005

kenny23:05:06

Oooo I see. I've never noticed that dropdown before 😮

cfleming23:05:44

Actually, you don’t have to modify the Defaults, just create a Remote configuration and modify that.

kenny23:05:07

It sorta works haha. My fn is

(defn my-add
  [x y]
  (+ x y))   ; <-- breakpoint here
I call (my-add 1 2) and it opens the breakpoint UI except it thinks both x and y are null.

cfleming23:05:31

Ok, so that might be because of locals clearing.

cfleming23:05:49

If you hover over that debug button in the toolbar, what does it say?

kenny23:05:12

"Locals will be cleared (prod mode)"

cfleming23:05:19

Ok, so click that.

kenny23:05:38

Ooo shiny

cfleming23:05:55

Cursive enables that by default, but it can’t if you’re using a remote REPL.

cfleming23:05:00

Here’s the trick:

cfleming23:05:22

It’s a flag that affects the compilation of code, so you’ll have to recompile your code after switching the flag.

cfleming23:05:32

So just re-load your ns and things should be good.

kenny23:05:27

Gotcha. And is there a reason that it is showing x and y as strings instead of numbers?

cfleming23:05:52

Are you passing it strings?