Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging mobile Safari in iOS 8 and iOS 9

Tags:

After switching to new versions of iOS, I've not been able to debug my web app from OS X Safari to my iPhone Safari browser. My iPhone shows up but I get no options.

On my iPhone, I have allowed the web inspector.

English: Developer -> Johans iPhone -> No inspectable applications

English: Developer -> Johans iPhone -> No inspectable applications.

If I, however save my web app to my home screen - I can get the developer tools for that app, but it's not what I want at this occasion. Unfortunately I have no other iOS / OS X devices to test with, so any help would be greatly appreciated.

like image 512
jollelj Avatar asked Sep 24 '14 10:09

jollelj


People also ask

How do I inspect Safari Mobile?

With Safari open, select the Develop menu in the menu bar. Toward the top of that list, you should see your device's name and the windows that are available to inspect. Select the page or application to inspect, and the inspection window will open.

How do I use developer tools in Safari iOS?

From the Safari menu bar, select Develop and choose the name of your attached iOS device, then select the URL that appears under Safari to open the debug console for that site. After you connect your device, use your Mac to inspect the website you want to debug and have it open in the Safari mobile browser.

Does Safari have a debugger?

Safari includes Web Inspector, a powerful tool that makes it easy to modify, debug, and optimize websites for peak performance and compatibility on both platforms. And with Responsive Design Mode, you can preview your web pages in various screen sizes, orientations, and resolutions.


2 Answers

Though this is an old question, it should be mentioned somewhere in the answer that you actually have to enable remote inspection on the iPhone first before anything will show up.

Go to: Settings --> Safari --> Advanced --> Web Inspector

Enable Web Inspector

like image 148
tabrindle Avatar answered Sep 20 '22 14:09

tabrindle


Debugging iOS 8 mobile Safari requires desktop Safari 7.1, which is only available with OS X 10.9.5 or greater.

What you need to do is:

  1. Update (via Apple menu->Software Update) to OS X 10.9.5 (if you haven't already)
  2. Once you've done that, you should see the Safari 7.1 in the list of pending updates

Once done, you should see be able to debug as usual via desktop Safari.

like image 39
Josh Avatar answered Sep 20 '22 14:09

Josh