Please note, this technique will only work with iOS 6 or above. There’s another technique for iOS 5 that I’ll cover in a future blog post.
1: Enable Developer Tools in Safari
First, you need to make sure that you have Safari’s Develop menu visible. If not, open the Safari Preferences, select the Advanced tab, and check the “Show Develop menu in menu bar” checkbox.
2: Enable Web Inspector in iOS
Next, you need to enable the Web Inspector in iOS. This will let you debug your iPad or iPhone (or iPod Touch) over USB. Select Safari in the Settings app and tap the Advanced option. Then turn on the Web Inspector.
3: Connect and Debug
Now we’re all setup, it’s time to debug. Connect your iPad to your Mac with a USB cable and open Safari. In the Develop Menu, you’ll see that your iPad now appears.
Next week I’ll show you how to do the same thing for Android.