dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
2016-02-03T00:00:04.000324Z

maybe I should wrap my code into my own try-catch and display better stacktrace

2016-02-03T00:00:10.000325Z

those errors are generated by devtools

2016-02-03T00:00:29.000326Z

they have their own try-catch when calling custom-formatter apis

jaen 2016-02-03T00:00:49.000327Z

Right, but it's still a formatter provided by cljs-devtools, yes?

2016-02-03T00:01:10.000329Z

yes

2016-02-03T00:01:25.000330Z

I doubt you have something else providing custom formatters

2016-02-03T00:01:36.000331Z

devtools do not use custom formatters internally for their own stuff

2016-02-03T00:01:56.000332Z

they have some other (similar) system which was implemented even before custom formatters existed

2016-02-03T00:02:36.000333Z

I think break on uncaught exception should break on the problem

2016-02-03T00:02:42.000334Z

in your case

2016-02-03T00:03:23.000335Z

because it will be devtools calling into my cljs-devtools function which lives in your page context and raises

jaen 2016-02-03T00:04:27.000336Z

Hmm, activating pause on caught exceptions doesn't seem to catch it; I guess I would probably have to run out of the plugin?

jaen 2016-02-03T00:04:35.000337Z

And meta-debug it?

2016-02-03T00:05:41.000338Z

I would say no, but you can easily try it, change dirac extension options to open dirac in a new window (instead of popup)

2016-02-03T00:06:09.000339Z

then open the dirac again in window and you should be able to debug dirac using internal devtools

2016-02-03T00:06:18.000340Z

try to catch the exception there

2016-02-03T00:06:38.000341Z

extension options can be changed on “chrome extensions” page

jaen 2016-02-03T00:07:48.000342Z

Ok, that's weird

jaen 2016-02-03T00:07:54.000343Z

It doesn't pause either o_0

2016-02-03T00:08:25.000344Z

it should pause in your js context, not in dirac devtools

2016-02-03T00:08:39.000345Z

because it calls into user code living in the page

2016-02-03T00:09:23.000346Z

maybe they use some flag, which makes that code execution ignore breakpoints

jaen 2016-02-03T00:09:42.000347Z

Possibly

jaen 2016-02-03T00:09:49.000348Z

Because as far as I understand this should be stoppping

jaen 2016-02-03T00:10:05.000351Z

And yet it doesn't

2016-02-03T00:10:46.000352Z

yes, this should work

2016-02-03T00:11:17.000353Z

so you other option is to use cljs-devtools from sources and do some debug logging there

2016-02-03T00:11:45.000354Z

maybe (js-debugger) could work, not sure

2016-02-03T00:12:15.000355Z

anyways, I can tell you where to put that try-catch and do some debug logging + stack trace printing

jaen 2016-02-03T00:12:47.000356Z

Sure, theough you don't have to do that now

2016-02-03T00:13:08.000357Z

no

2016-02-03T00:13:26.000358Z

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

jaen 2016-02-03T00:13:57.000360Z

I'd rather do it after I'm through with my thesis - fortunately I could work that around by just seqing the database.

jaen 2016-02-03T00:14:09.000361Z

But when I will have time I can take a look at it again.

frank 2016-02-03T05:38:57.000362Z

😕 I seem to be having trouble with secretary and goog.History` when I enable devtools

frank 2016-02-03T05:41:31.000363Z

I'm no longer able to navigate to different pages when I enable devtools and I get errors like this one:

frank 2016-02-03T05:42:33.000365Z

would you know of any potential causes of this?

frank 2016-02-03T05:45:40.000366Z

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)))

frank 2016-02-03T05:46:48.000367Z

as soon as I remove the bit that calls (devtools/install!), the problem goes away

2016-02-03T20:44:19.000368Z

try not to use :sanity-hints