> even the call stack in chrome doesn't help me

I find chrome devtools "Sources" tab very helpful in tracing down origins of 
exceptions. I enable "pause on exceptions" button with "pause on caught 
exceptions" check box. Then reproduce the exception. When devtools stop, I have 
full callstack available for exploring. The problem may not be obvious from top 
stack frame, because it could be some library function which already received 
null or invalid data. I have to walk up to identify first stack frame which 
received unexpected inputs. Its caller is then usually responsible for the 
troubles. Usually it is my code calling into core library.

As a side note, I would like to dig my helper tool cljs-devtools[1] for debug 
printing cljs data structures into devtools console. Many times, just debug 
printing helped me resolve puzzling problems. Because I was passing some data 
with slightly wrong shape. Quick debug printing before I pass some arguments to 
problematic call can verify my assumptions real quick. cljs-devtools also 
greatly helps when walking callstack frames. On each selected frame you can 
inspect complex cljs values in auxiliary console using cljs-devtools pretty 
printing (newer Chrome Canary builds do that even automatically in 
watches/scope views).

Also you might want to look into my recent fork of cljs-devtools. It has some 
helper code for the infamous "Cannot read property 'call' of null" error:
https://github.com/darwin/cljs-devtools/blob/master/src/devtools/sanity.cljs

[1] https://github.com/binaryage/cljs-devtools


On Saturday, August 29, 2015 at 8:27:07 PM UTC+2, Roger Gilliar wrote:
> The main problem is that even the call stack in chrome doesn't help me in 
> narrowing down the origin of the problem.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to