Hi friends. How does one get dirac running with figwheel?
Hi, dirac and figwheel are orthogonal, you can use them independently I believe
Well, figwheel runs an nRepl
I believe
Shouldn't I need dirac to target the same repl?
Or something
(Am clojure newbie)
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
getting figwheel to start nREPL server is alone quite advanced adventure
it seems to have options for it now
but I would be curious if dirac could connect to nREPL server created by figwheel
it is covered here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
running two entirely different application instances to debug sounds dreadful
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
perhaps
I’m not sure, its been a month or two I last saw those nREPL-piggieback-weasel-stuff and I don’t remember details
it is really advanced stuff unfortunately
is there a decent strategy to debug other than dirac?
E.g. how can one just set breakpoints
well, debugging clojurescript can be done in standard devtools using source maps
sort of
dirac just gives you ability to eval clojurescript on paused breakpoint
chrome isn't thrilled to to set breakpoints on clojure code
that is something 99% cljs developers can live without
hmm
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
maybe my only problem is that dirac.agent namespace is missing
darwin: maybe cljs-devtools is what I'm missing moreso
the readme is pretty empty
btw. you can use cljs-devtools without dirac, that should be your first step if you are new to cljs dev
where does (js-debugger) come from. is that built in?
dirac is really for more advanced projects when you get familiar with tooling
ehh, i mean I don't agree that having good debugging tools is limited to advanced projects : P
(js-debugger)
compiles to debugger;
javascript statement, it is built-in cljs.core
(js* “debugger;”)
would emit the same code I believe
ah
well, at least I wont have to run a custom chrome to do that too : P
not anymore, but we had to wait 6+ months for it to appear in stable chrome :simple_smile:
my recommendation: start with cljs-devtools + figwheel, use figwheel’s standard REPL (it is not nREPL)
how do I then deal with name mangling at break points
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
and maybe later, setup dirac agent to connect to that nREPL server
ad name mangling, in dev mode (:optimizations :none) the names are not mangled
hmm
just decorated slightly when javascript does not allow certain characters
thought that was on by default
neither cljs-devtools nor figwheel support advanced builds
right