Fork me on GitHub
#dirac
<
2016-06-19
>
danielsz11:06:11

Hi! I'm trying to get Dirac working. Hitting Unable to resolve backend-url for Dirac DevTools. target-url=, tab-url=.

danielsz11:06:42

Using Chrome Version 51.0.2704.84 (64-bit) (not Canary)

danielsz11:06:54

Is this good enough or am I missing something?

danielsz11:06:32

OK, I've launched chrome with google-chrome --remote-debugging-port=9222 and now the Dirac devtools doesn't complain.

danielsz11:06:16

However, when I type (dirac! :join) in the REPL, it says `Your session joined Dirac (ClojureScript). The specific target Dirac session will be determined dynamically according to current matching strategy. No connected Dirac session is "most recent Dirac session".`

darwin11:06:46

@danielsz: yes, that works as expected, please read (dirac! :help) and (dirac! :help :join)

darwin11:06:13

your session will join dirac session, after there will be one available

danielsz11:06:52

@darwin: Yes, I'm translating this to my Emacs Cider setup 🙂

darwin11:06:18

let me know how it goes 🙂 nobody probably tried this before...

danielsz11:06:41

BTW, I'm using Boot and boot-cljs-devtools.

darwin11:06:22

cool, but I can’t help much with those, because I’m still using lein

darwin11:06:28

because of figwheel

darwin11:06:59

boot is great tough

danielsz11:06:17

no problem. What is the keyboard shortcut to open the Dirac Devtools in Chrome?

darwin11:06:16

depends on your system I guess, go to <chrome://extensions>, and see “keyboard shortcuts” in bottom right

darwin11:06:36

there you can setup also a hot key for instant repl focus

danielsz11:06:02

Cool. Thank you.

danielsz11:06:28

My next problem is that (dirac! :ls) tells me: No Dirac sessions are currently available. Connect with at least one Dirac REPL to your nREPL server.

darwin11:06:30

do you have dirac agent running? do you have Dirac DevTools open, switched to console, switched to dirac prompt and connected to the agent?

danielsz11:06:48

Dirac agent is running.

danielsz11:06:40

How do I switch to dirac prompt?

darwin11:06:58

you should see a welcome message in your DevTools console, explaining it

darwin11:06:11

assuming you have the latest dirac version 0.6.0

darwin11:06:58

CTRL+. and CTRL+,

danielsz11:06:04

I have the latest dirac version, but the welcome message doesn't appear. Should I restart the browser?

danielsz11:06:26

Only these messages: Installing Dirac Runtime v0.6.0 and enabling features :repl util.js:206 Installing CLJS DevTools 0.7.0 and enabling features :custom-formatters :sanity-hints

darwin11:06:40

no, you must be looking at something else I guess

darwin11:06:06

do you see “Dirac v0.6.0” in the title of the window you are looking at?

danielsz11:06:28

Yes, I see that.

darwin11:06:20

then try to switch the prompt, dunno why you don’t see the welcome message

darwin12:06:04

Also I would recommend using the Canary, I don’t test Dirac with older Chrome versions, and chances are it simply breaks with older chrome

danielsz12:06:11

Okay, thanks for the tip. I'm doing some progress with my current version of Chrome but I'll switch if I can't get the full experience.

darwin12:06:11

btw. you can open internal DevTools to debug Dirac DevTools, simply use standard keyboard shortcut for opening devtools while your Dirac DevTools window is focused. You might spot there some errors.

danielsz12:06:38

Cool. I managed to join the dirac session. Evaluation of simple forms works. However, in-ns my.namespace results in an infinite loop :face_with_rolling_eyes:

darwin12:06:15

might be some conflict between nREPL middleware

darwin12:06:37

try to remove all non-essential CIDER middleware

danielsz12:06:55

How do I interrupt evaluation?

darwin12:06:03

no support for that

darwin12:06:44

I assume that infinite loop is in your REPL process, right?

danielsz12:06:12

No, in the Dirac prompt in the Dirac Devtools.

danielsz12:06:40

REPL is stuck, doesn't return to prompt.

darwin12:06:19

hm, I don’t think Dirac prompt is waiting for the result synchronously

darwin12:06:43

do you see any errors in the internal console? (for Dirac DevTools window)

danielsz12:06:24

I've restarted everything, but this time I switched to my namespace with (ns my.namespace) and this did the trick.

danielsz12:06:06

With the Canary channel, do you also need to launch chrome with remote-debugging or is it on by default?

darwin12:06:25

it is not on by default

darwin12:06:39

(security reasons)

danielsz12:06:41

So you always launch Chrome from the command line with that switch?

danielsz12:06:37

Thanks for your help. It seems to be working now. I'll play with it.

darwin12:06:52

np, have fun!

danielsz12:06:35

And by the way, the awesome thing with boot-cljs-devtools is that most configuration is done behind the scenes.

danielsz13:06:17

@darwin You're not using Clojure to write the binaryage mac apps, are you?

darwin13:06:29

no 🙂

darwin13:06:51

I don’t use Clojure for anything serious 😉

danielsz17:06:41

@darwin: Haha. Well, in that case, you're doing a great service for mankind.