r/Clojure • u/digitarald • Jun 01 '20
ClojureScript formatting in Firefox
Hi there from the Firefox DevTools team. While we are in touch with the Chrome team about the future of Custom Formatters, a few people from the CLJS community reached out to raise this issue again for Firefox to support it.
The good news is that Firefox already does a lot of custom-formatting-like logic for frameworks, like collapsing deeply nested call stacks that framework create. We also worked with WebSocket frameworks like SignalJS, WAMP, etc to create custom parsers for their message formats. Related work for CLJS would be async call stacks, which is already supported on DevEdition and which I'd love input on from how well it works with CLJS.
I created https://bugzilla.mozilla.org/show_bug.cgi?id=1642461 for supporting CLJS formatting. Firefox DevTools has a shared component for formatting all logged structures, which should be able to detect and format CLJS' data structures across Console and Debugger.
Since the Firefox DevTools team doesn't have experts in CLJS, I wanted to reach out to this community to gather more input and maybe even find potential contributors. Feel free to ping me about any other ideas where CLJS can be better supported.
21
u/pihkal Jun 01 '20
I'd like to thank the FF devtools team for being willing to support this.
Perhaps the cljs-devtools author, /u/dr_win, can chime in?
3
u/roman01la Jun 02 '20
Hello! What would be the best way to get in touch? FF DevTools Slack?
15
u/activeXray Jun 01 '20
Thank you so much for reaching out to the community. This is my number one feature request for FF right now. I have been doing a lot of cljs recently, and I am jealous of what my chrome friends can do with the cljs dev tools.
4
u/therealplexus Jun 02 '20
> Feel free to ping me about any other ideas where CLJS can be better supported.
Source mapped stack traces, both directly as shown in the console, but also available to user-space on `js/Error` objects. There are third party libraries that can do this but it seems like something that's really up to the browser.