maybe I should wrap my code into my own try-catch and display better stacktrace
those errors are generated by devtools
they have their own try-catch when calling custom-formatter apis
Right, but it's still a formatter provided by cljs-devtools, yes?
yes
I doubt you have something else providing custom formatters
devtools do not use custom formatters internally for their own stuff
they have some other (similar) system which was implemented even before custom formatters existed
I think break on uncaught exception should break on the problem
in your case
because it will be devtools calling into my cljs-devtools function which lives in your page context and raises
Hmm, activating pause on caught exceptions doesn't seem to catch it; I guess I would probably have to run out of the plugin?
And meta-debug it?
I would say no, but you can easily try it, change dirac extension options to open dirac in a new window (instead of popup)
then open the dirac again in window and you should be able to debug dirac using internal devtools
try to catch the exception there
extension options can be changed on “chrome extensions” page
Ok, that's weird
It doesn't pause either o_0
it should pause in your js context, not in dirac devtools
because it calls into user code living in the page
maybe they use some flag, which makes that code execution ignore breakpoints
Possibly
Because as far as I understand this should be stoppping
And yet it doesn't
yes, this should work
so you other option is to use cljs-devtools from sources and do some debug logging there
maybe (js-debugger) could work, not sure
anyways, I can tell you where to put that try-catch and do some debug logging + stack trace printing
Sure, theough you don't have to do that now
no
if you wanted to dig into it, wrap this let block with try-catch and try to log exception info https://github.com/binaryage/cljs-devtools/blob/master/src/devtools/format.cljs#L357
I'd rather do it after I'm through with my thesis - fortunately I could work that around by just seq
ing the database.
But when I will have time I can take a look at it again.
😕 I seem to be having trouble with secretary and goog.History` when I enable devtools
I'm no longer able to navigate to different pages when I enable devtools and I get errors like this one:
would you know of any potential causes of this?
I'm using the following function to set up goog.History to work with secretary:
(defn hook-browser-navigation! []
(doto (History.)
(events/listen
EventType/NAVIGATE
(fn [event]
(secretary/dispatch! (.-token event))))
(.setEnabled true)))
as soon as I remove the bit that calls (devtools/install!)
, the problem goes away
try not to use :sanity-hints