0.4.0
Meta data support and sanity hints
Meta data support
If cljs value has some meta data attached. It gets printed as expandable "meta" item after the value itself:
Sanity hints
Sometimes your DevTools shouts at you Cannot read property 'call' of null
!
And now what? you ask.
It is possible to enable "sanity hints". An attempt to augment uncaught exceptions and error object to include a bit of additional knowledge related to incoming error. It tries to fetch the original source file, extract relevant part to show you more context and mark javascript error there. This is expected to work only with :optimizations none
compiler mode and it is disabled by default because it relies on monkey patching. But it is worth it:
Note <<< ☢ RETURNED NULL ☢ <<<
part which points to error location. The uncaught error was raised by calling sanity-test-handler
in the following code:
(defn fn-returns-nil [])
(defn sanity-test-handler []
((fn-returns-nil) "param"))
You can enable the feature by setting this pref prior calling install!
:
(devtools/set-pref! :install-sanity-hints true) ; this is optional
(devtools/install!)
Technical details are described in the source file.