Skip to content

Instantly share code, notes, and snippets.

@salami162
Created August 13, 2013 21:37
Show Gist options
  • Save salami162/6225947 to your computer and use it in GitHub Desktop.
Save salami162/6225947 to your computer and use it in GitHub Desktop.
Debug Safari on iPhone

Here is an overview of how to use the Web Inspector Tools to debug the Safari browser on the iPhone. You can also debug on an actual iPhone but the simulator that comes with Xcode should be sufficient in most situations. Below you will find the instructions on how to debug using the iOS Simulator.

Prerequisites

  1. Mac OSX Lion (10.7.4) or higher
  2. Safari 6
  3. Xcode 4.5 or higher iOS6 SDK (available in the app store)

Steps

  1. Open up the Xcode App. Right click on the Xcode icon and navigate to the iOS Simulator app. Open the Safari app and navigate to the URL you need to debug.
    xcode iOS Simulator
  2. Open up Safari 6 and ensure you have the developer tools in Safari turned on. Safari Dev Tools.
    If you can't see the "Develop" in the menu bar, click "Safari > Preferences > Advanced" and select the "Show develop menu in the menu bar" checkbox.
    Turn Developer Tools on
  3. On your mac's Safari use the "Develop" menu to navigate to the "iPhone Simulator" option. This will provide you a list of open pages on the iOS Simulator you can now use the developer tools to debug. Develop menu
  4. You should now be using inspecting the browser on the iOS Simulator. Finished
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment