dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
2016-03-13T21:30:54.000003Z

Hi friends. How does one get dirac running with figwheel?

2016-03-13T21:32:27.000004Z

Hi, dirac and figwheel are orthogonal, you can use them independently I believe

2016-03-13T21:32:59.000005Z

Well, figwheel runs an nRepl

2016-03-13T21:33:01.000006Z

I believe

2016-03-13T21:33:14.000007Z

Shouldn't I need dirac to target the same repl?

2016-03-13T21:33:20.000008Z

Or something

2016-03-13T21:33:27.000009Z

(Am clojure newbie)

2016-03-13T21:34:08.000011Z

well this would be quite advanced setup, I think you can use figwheel independently as a starting point and then maybe try to integrate them both

2016-03-13T21:34:45.000013Z

getting figwheel to start nREPL server is alone quite advanced adventure

2016-03-13T21:35:07.000014Z

it seems to have options for it now

2016-03-13T21:35:09.000015Z

but I would be curious if dirac could connect to nREPL server created by figwheel

2016-03-13T21:35:39.000018Z

running two entirely different application instances to debug sounds dreadful

2016-03-13T21:36:36.000019Z

maybe you can do what they propose, start nREPL server via lein repl and then start figwheel from within that nREPL server, and dirac too

2016-03-13T21:37:13.000020Z

perhaps

2016-03-13T21:37:19.000021Z

I’m not sure, its been a month or two I last saw those nREPL-piggieback-weasel-stuff and I don’t remember details

2016-03-13T21:37:33.000022Z

it is really advanced stuff unfortunately

2016-03-13T21:37:37.000023Z

is there a decent strategy to debug other than dirac?

2016-03-13T21:37:44.000024Z

E.g. how can one just set breakpoints

2016-03-13T21:38:12.000025Z

well, debugging clojurescript can be done in standard devtools using source maps

2016-03-13T21:38:21.000026Z

sort of

2016-03-13T21:38:38.000027Z

dirac just gives you ability to eval clojurescript on paused breakpoint

2016-03-13T21:38:49.000028Z

chrome isn't thrilled to to set breakpoints on clojure code

2016-03-13T21:38:54.000029Z

that is something 99% cljs developers can live without

2016-03-13T21:40:03.000030Z

hmm

2016-03-13T21:40:05.000031Z

I usually tend to do a lot of debug printing using cljs-devtools, and sometimes put (js-debugger) around, if I cannot set a breakpoint from UI

2016-03-13T21:40:20.000032Z

maybe my only problem is that dirac.agent namespace is missing

2016-03-13T21:40:32.000033Z

darwin: maybe cljs-devtools is what I'm missing moreso

2016-03-13T21:40:47.000034Z

the readme is pretty empty

2016-03-13T21:41:10.000035Z

this one? https://github.com/binaryage/cljs-devtools

2016-03-13T21:42:02.000037Z

btw. you can use cljs-devtools without dirac, that should be your first step if you are new to cljs dev

2016-03-13T21:42:21.000038Z

where does (js-debugger) come from. is that built in?

2016-03-13T21:42:22.000039Z

dirac is really for more advanced projects when you get familiar with tooling

2016-03-13T21:42:40.000040Z

ehh, i mean I don't agree that having good debugging tools is limited to advanced projects : P

2016-03-13T21:42:48.000041Z

(js-debugger) compiles to debugger; javascript statement, it is built-in cljs.core

2016-03-13T21:43:21.000042Z

(js* “debugger;”) would emit the same code I believe

2016-03-13T21:43:41.000043Z

ah

2016-03-13T21:44:23.000046Z

well, at least I wont have to run a custom chrome to do that too : P

2016-03-13T21:45:04.000047Z

not anymore, but we had to wait 6+ months for it to appear in stable chrome :simple_smile:

2016-03-13T21:46:22.000048Z

my recommendation: start with cljs-devtools + figwheel, use figwheel’s standard REPL (it is not nREPL)

2016-03-13T21:46:59.000049Z

how do I then deal with name mangling at break points

2016-03-13T21:47:03.000050Z

later when you iron out your project needs, maybe stop using figwheel’s REPL, start own nREPL server, run figwheel from withing that nREPL server

2016-03-13T21:47:24.000051Z

and maybe later, setup dirac agent to connect to that nREPL server

2016-03-13T21:48:31.000052Z

ad name mangling, in dev mode (:optimizations :none) the names are not mangled

2016-03-13T21:48:43.000053Z

hmm

2016-03-13T21:48:45.000054Z

just decorated slightly when javascript does not allow certain characters

2016-03-13T21:48:49.000055Z

thought that was on by default

2016-03-13T21:49:16.000056Z

neither cljs-devtools nor figwheel support advanced builds

2016-03-13T21:49:31.000058Z

right