@darwin Is there a way to connect dirac to a node inspector web socket directly? I have a url that looks like this 127.0.0.1:7777/inspect/8380ad1ea17af8b
i plopped that in the options url field.. but its not opening. Hm, wonder how i can get chrome extension error logs
oh interesting.. the docs have a screenshot of the options UI and it has more options than mine does..
@ramblurr uploaded a file: https://clojurians.slack.com/files/U70QFSCG2/FAKG97CH4/screenshot_from_2018-05-04_20-11-04.png
Looks like its clipped? I can't resize or scroll in that dialog
@ramblurr it is definitely clipped, btw. you’ve probably missed this document: https://github.com/binaryage/dirac/blob/master/docs/node.md
not sure if it is still relevant, but at one point it worked with node (I don’t develop with node, so I didn’t test it recently)
Thanks, yea, those node docs are where I found out about the "missing" (clipped) options. I just needed to pass extra url params.
inspecting the extension options ui reveals a overflow: hidden
class on the body that hides the scroll bar
Those node docs don't mention anything about the Dirac Agent... is it not needed for node inspecting?
it is needed as well as nREPL server
it should be the same as with classic web dev
awesome, used the sample "repl" profile and it works great
confirmed it still works with node 🙂
great!
hm, so what's going on with the repl instance exactly? that's a full clojure jvm repl right?
that clipped preferences window problem is probably related to size of your chrome window
so when i type (+ 1 1)
into the dirac repl in devtools .. is it being executed in jvm or in my cljs node context?
I think those css styles come from chrome
in your node, jvm just runs clojurescript which compiles cljs -> js, which is then executed
cool, that makes sense
try something like (js/console.log (js/process.platform))
or process.release
@darwin using the node demo project, i can't seem to get the source maps to work properly
the http server serving the source maps is working (e.g., http://localhost:9988/.compiled/dirac_sample/demo.js.map)
and chrome pops up a notification bar that says "Source maps detected"
but I don't see the clojure code.. just the js
I’m sorry I cannot assist with this right now, the problem could be very subtle
it worked for me a year ago, but things could break or your setup has some issue
no worries, thanks for the help and effort thus far
this could give you some insights: https://dev.clojure.org/jira/browse/CLJS-1902
it was meant to give people an easy workaround for node+dirac+devtools source map issues
you might ask @richiardiandrea if he remembers the details, see his comment
oh man, that was long ago, don't really remember the details...
hm yea, the local webserver serving source maps is the workaround for that right?
Ah that patch is also for inlined source maps, that would be handy
yeah the inline side of source maps in cljs is only for self-host at the moment, there is no way to read them in iirc
still though, i wonder why the source mapping url workaround isn't working in this case.
ooh, using vanilla chrome devtools, the .cljs source is visible
strange
@richiardiandrea do you have any plans to re-submit that patch?
I think it should be rebased, but core team did not seem to keen at the time
maybe darwin can actually push that again
from reading the node.js ticket on source maps, it seems the "right way" is via source map inlining
it was a hairy code I completely lost context, that is why I’m not going to look at it again, I don’t really need it myself
because there is some specific wonkiness with absolute urls
feel free to jump on it 🙂
it probably needs a simple rebase, but understanding and testing it is the difficult part
maybe i can give it a go, haven't setup a cljs dev environment before
you might try to rebase it and test it with custom cljs compiler build on your machine
it will likely work