4 ms·
In web, I’d kill for a way to debug an error by replicating user’s state and play back actions and requests while stepping through an uncompiled version of the
by dclowd9901 4y ago
In web, I’d kill for a way to debug an error by replicating user’s state and play back actions and requests while stepping through an uncompiled version of the application running. I think I could solve bugs into infinity if I had that kind of power.
This kind of thing shouldn’t even be difficult, yet I have never been anywhere that has this kind of live code retrospection.
- grzm 4y agoFulcro (a library for Clojure/ClojureScript web applications ) has a way of doing this, and I'm sure it's not unique in this aspect: I just don't do enough work in this space to be familiar with the other offerings. This type of feature is valued in the Clojure community, so I wouldn't be surprised if reagent has something like this as well. And this type of thing isn't unique to Clojure, either. * https://book.fulcrologic.com/#_install_fulcro_inspect https://book.fulcrologic.com/#_install_fulcro_inspect * https://reagent-project.github.io https://reagent-project.github.io
- geokon 4y agoIronically one of my major annoyances in debugging Clojure is that stack traces don't come with a program state that can be inspected (as you get in ELisp or GDB)
- grzm 4y agoAgreed. Having a proper condition system in Clojure would be really great.
- jackrusher 4y ago. Sadly, the JVM unwinds the stack before returning the exception, which makes doing the right thing very hard.
- geokon 4y agoI'm probably missing some subtlety. I'd think you could have some "debug mode" layer where the Clojure runtime catches exceptions. Basically wrapping every exception in Clojure with a try/catch, and doing a try/catch on every interop call It's not ideal having two different modes (like a C++ Release/Debug) - but it'd be better than the current situation Maybe this is what CIDER's debug macro is actually doing - I always forget to play around with it :) I'll need to try it in the future. btw, thanks for your work. I really appreciate the stuff you've shared and it's nice to know someone else also uses thing/geom :)) Has the highly decoupled "mini-library" thing/geom architecture influenced Clerk? I'm been meaning to try it out - but notebooks always feel like they come with some ecosystem lock-in (esp if it's a company trying to make money - ie. Nextjournal). It'd guess it's part of why everyone reverts back to plain text. With thing/geom I just pick and choose and tweak the pieces I need - and then swap them out when I want to change to something else entirely (mostly for building GUI applications in CLJFX)
- sfink 4y agohttps://replay.io https://replay.io ?