Last Updated: February 25, 2016
·
721
· marianzange

Debugging web views in native OSX apps

I've started to increasingly use web views to replace native UIs on Mac applications. Debugging web views in native apps is actually quite simple. Just run the following command in your Terminal and replace the example app ID with your own:

defaults write com.company.appName WebKitDeveloperExtras -bool true

Now you can just right click in your web view and select 'Inspect Element' which will open the developer tools in a new window.