Fork me on GitHub
#dirac
<
2016-02-03
>
darwin00:02:04

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

darwin00:02:10

those errors are generated by devtools

darwin00:02:29

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

jaen00:02:49

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

darwin00:02:25

I doubt you have something else providing custom formatters

darwin00:02:36

devtools do not use custom formatters internally for their own stuff

darwin00:02:56

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

darwin00:02:36

I think break on uncaught exception should break on the problem

darwin00:02:42

in your case

darwin00:02:23

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

jaen00:02:27

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

jaen00:02:35

And meta-debug it?

darwin00:02:41

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

darwin00:02:09

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

darwin00:02:18

try to catch the exception there

darwin00:02:38

extension options can be changed on “chrome extensions” page

jaen00:02:48

Ok, that's weird

jaen00:02:54

It doesn't pause either o_0

darwin00:02:25

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

darwin00:02:39

because it calls into user code living in the page

darwin00:02:23

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

jaen00:02:42

Possibly

jaen00:02:49

Because as far as I understand this should be stoppping

jaen00:02:05

And yet it doesn't

darwin00:02:46

yes, this should work

darwin00:02:17

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

darwin00:02:45

maybe (js-debugger) could work, not sure

darwin00:02:15

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

jaen00:02:47

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

darwin00:02:26

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

jaen00:02:57

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

jaen00:02:09

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

frank05:02:57

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

frank05:02:31

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

frank05:02:33

would you know of any potential causes of this?

frank05:02:40

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

frank05:02:48

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

darwin20:02:19

try not to use :sanity-hints