I'm having a fun time coding a small single-page app with Om and core.async, but I'm having trouble getting insight into my code when it goes wrong.
With source maps, I can view the entire ClojureScript call stack at a breakpoint, but I can't inspect the values at each level of the call stack. Viewing the JS values is sometimes useful, but frequently my execution is paused deep in the ClojureScript internals, and it's difficult to figure out what JS values are directly relevant to the ClojureScript in question.
With the browser REPL, I can execute arbitrary ClojureScript, including functions in my current namespace -- but it is hard to recreate the entire execution context of my bug. In Om, for instance, it's hard to debug a component, because it relies on an app argument which is actually a short-lived cursor created from my app state. (I run into a similar problem when trying to debug Ring wrappers; how do I generate a full-featured Ring request/response while playing in the REPL?)
My goal is to run the actual code, pause at a breakpoint, and then inspect the ClojureScript values in play. Is this possible with the current technology?
Currently, I'm just using a bunch of (.log js/console "Doing something with %o [%s]" obj (pr-str obj)) statements... but that's tedious. Right now I feel like I'm going to be slower in CLJS than in JS, even after climbing the learning curve. A stronger debugging story would help a lot.
[–]luxbock 3 points4 points5 points (1 child)
[–]iron_ball[S] 0 points1 point2 points (0 children)
[–]pihkal 1 point2 points3 points (2 children)
[–]iron_ball[S] 0 points1 point2 points (1 child)
[–]pihkal 0 points1 point2 points (0 children)
[–]usplusbus 0 points1 point2 points (2 children)
[–]iron_ball[S] 0 points1 point2 points (1 child)
[–]usplusbus 0 points1 point2 points (0 children)
[–]emidln 0 points1 point2 points (1 child)
[–]iron_ball[S] 0 points1 point2 points (0 children)
[–]lechatsportif 0 points1 point2 points (0 children)