Debugging your app on an iOS device

Ever wanted to debug your app while it’s actually running on an iPhone or iPad? You can do so if you have a Mac.

First, make sure Safari on your desktop is up to date (6.0.3 works) and your device is running iOS 6. In Safari, enable the Develop menu in the Advanced pane of Safari preferences.

Connect your device to your Mac and start your AppStudio App. You can start in Safari or as a Home Screen app.

In Safari, select the Develop menu. You’ll see something like this:

debugger

Select the device and the app you want to debug. You’ll get a screen like this (after you click on the icon at the top left):

debugger1

Now, you’re running the Safari Debugger with your device. You’ll see error messages, be able to examine source code and variable values, execute JavaScript statements from the console, and do restarts and pauses.

Complete information on using the Safari Debugger is here.

This is especially useful for debugging communications and AJAX issues which cannot run in a local browser.

This entry was posted in iOS, tips. Bookmark the permalink.