Fork me on GitHub

How do you guys deal with debugging production errors in react native apps compiled in shadow-cljs?


we don't have errors in production

😎 18
🎉 3

@naomarik I use Bugsnag and upload source maps to it, which will give me a good idea where something went wrong, but for the most part I really don’t have errors that trigger crashes, I have incorrect implementations.


@naomarik Are you asking about :advanced?


Yeah, I recently had to blindly debug an issue I was having with advanced compilation because error message wasn't saying anything. Couldn't figure out how to get source maps to work, used chrome debugger too. shadow-cljs release app --debug helped a little bit though.


You need two source maps: one produced by ClojureScript and one produced by RN Metro. When you get an error with a stack trace from RN, you need to walk the source maps in the correct order to find where the error in the CLJS code originated. I wrote some custom code to do this but I haven’t polished it/made it into a lib at this point.