Enable Developer Options in Safari

February 20, 2020 ยท View on GitHub

You can debug your JavaScript program running in BabylonNative for MacOS or iOS using Safari. These simple steps will show you how you can hook the Safari debugger to your JavaScriptCore Context.

Enable Developer Options in Safari

Run Safari, go to the preferences:

DebugMac

Click the Advanced tab and enable developer options

DebugMac

Hooking JavaScriptCore Context

Run your playground.

DebugMac

In Safari, in the develop menu, you should see your app and the JSC context.

DebugMac

Check everything is properly connected by setting a breakpoint in the debugger. You should see your scripts and all the details.

DebugMac