Fork me on GitHub
#re-frame
<
2017-11-19
>
sandbags11:11:57

I don't know if anyone here ever used the Pry debugger for Ruby/Rails I was wondering if it's possible to do the same thing with re-frame. That is, to be able to drop into a repl inside a function?

sandbags11:11:53

In a Rails handler you'd put a statement like binding.pry! and, when execution hits that statement, it would drop into a REPL so that you could explore the local bindings etc...

p-himik11:11:42

@sandbags Maybe not exactly what you mean/want, but you can use (js-debugger) and https://github.com/binaryage/dirac

sandbags11:11:37

@p-himik actually, i think so

sandbags11:11:21

although, at a glance, the setup appears somewhat less trivial

sandbags11:11:51

you seem to require a custom version of Chrome etc...

sandbags11:11:50

have you used it?

sandbags11:11:40

so many fragile moving parts

danielneal12:11:50

This might do what you want too although not in exactly the same way

sandbags12:11:34

Unfortunately having set Dirac up I was able to set a breakpoint in my code, but the local scope isn't actually available!

sandbags12:11:45

also code-stepping doesn't appear to work properly

sandbags12:11:26

i mean, i guess it is incredible enough that you can even start this monstrosity. it seems almost churlish to expect it to work.

danielneal12:11:37

I'm working on an app in react native in clojurescript these days and I get vertigo if I think too long about the stack underneath me

sandbags12:11:19

scope-capture looks potentially something like basic pry

sandbags12:11:22

thanks for that

sandbags12:11:37

for such a repl centred language i am little more surprised this isn't out-of-the-box

sandbags12:11:53

though i realise that probably just means it isn't easy

sandbags12:11:27

Great shame Dirac doesn't seem to work

sandbags12:11:33

back to logging statements i guess

darwin14:11:31

@sandbags Dirac works, you probably didn't follow the setup steps properly. I could help you to set it up if you provided more info.

sandbags17:11:19

@darwin i don't want to put you to any trouble, what information would you need?

darwin17:11:46

chrome version, dirac version, clojurescript version, any possible warnings/error messages, etc.

darwin17:11:53

we can move to #dirac

sandbags17:11:41

Yes, I was using Canary latest

darwin17:11:00

also for troubleshooting you could try to open internal devtools on Dirac itself and also on Dirac's chrome extension background page: https://github.com/binaryage/dirac/blob/master/docs/faq.md#something-broke-how-do-i-debug-dirac-devtools-frontend

darwin17:11:08

there might be some error messages