Fork me on GitHub
#cljsrn
<
2016-09-09
>
jorda0mega02:09:09

does anyone have any recommendations for debugging (e.g. general strategies, tools, etc)? error messages seem very obscure and inspecting the cljs source in chrome is difficult at times since I don't have access to the variables in scope.

artemyarulin04:09:36

REPL FTW! I’ve seen many people using here live reloading (obviously), but not that many actually using nrepl. In my case I rarely use Chrome, emacs + cider + nrepl covers almost all debug sessions

jeeq04:09:10

Hi guys very beginner question here, I have trouble connecting to nrepl through cider. I have project created with re-natal (re-natal init projectname). Then I go into emacs and jack-in… from there I’m not sure how to start figwheel to see changes on ios (simulator and device) when I do > re-natal use-figwheel and > lein figwheel ios, figwheel server starts and I have to open up separate terminal to > re-natal xcode. doing that gives me repl on my terminal but I’m not using emacs cider at this point at all…

artemyarulin04:09:12

@jeeq No sure about jack-in, but once fighweel start it will start nrepl as well - you should see something like nrepl is listening on port N. Then I simply cider-connect to that port. Clojure REPL starts, then in order to lift REPL to CLJS repl you can use (use 'figwheel-sidecar.repl-api)(cljs-repl)

artemyarulin04:09:34

oh and don’t forget to open ios simulator 🙂

artemyarulin04:09:45

one note - I’m not familiar with re-natal, maybe it has some other shortcut and workaround for repl

vikeri13:09:29

@jorda0mega: I agree with artemyarulin about the REPL, but I know that @pesterhazy disabled source maps for boot-react-native if that is what you are using, so if that gets enabled again the debugging should be easier if you are not used to debugging compiled js-code (I’ve sort of gotten used to it). For debugging re-frame 0.8.0 subscriptions I wrote a simple macro: https://gist.github.com/vikeri/e73be3f6be6a84bb7fef71bb63c21d83

pesterhazy13:09:29

@jorda0mega are you using boot-react-native or re-natal?

jorda0mega15:09:30

@jeeq @vikeri @pesterhazy I have been using re-natal. I will give the repl a try. Thanks for the tip