Hi! I had a simple question which I can’t seem to find an answer to. I’m building Hotwire Native apps, and I’m wondering, is there any way to see the JS console logs for a Hotwire Native app? Like, if I put console.log
in my bridge component controller JS, can I see that somewhere? I don’t know how to debug this because the controllers don’t seem to connect or do anything when it’s running in a regular browser. Thank you! Apologies if this is answered somewhere but I just couldn’t find anything.
Answering my own question here: at least for iOS, you can access the JS console by using Safari on the desktop. You just need to enable developer settings, and then connect to the simulator’s webview from the Develop menu. To me it seems like it’d be nice if it was available within the regular Xcode logs, but I don’t know if that’s an option (or if it’s something that would need to be added to Hotwire or something).
Source: javascript - How to read console logs of WKWebView programmatically - Stack Overflow