Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Debug

Remote Debugging Webpages In iOS Safari

Learn how to remote debug webpages in iOS Safari using Web Inspector on Mac, plus workarounds for Windows and Linux with JSConsole and emulators.

Last Updated on:

Remote debugging webpages in iOS Safari connects Safari's Web Inspector on a Mac to a live page open on a connected iPhone or iPad.

Apple restricts this native workflow to macOS and Safari 6 or later, though since iOS 16.4 the same Web Inspector also attaches to any browser built on WKWebView, such as Chrome or Firefox on iOS.

This guide covers debugging iOS Safari on OS X, whether Chrome and Firefox on iOS support the same Web Inspector workflow, and remote debugging on Windows and Linux.

Key Takeaways

  • Remote debugging iOS Safari connects the desktop Safari Web Inspector on a Mac to a live page open on a connected iPhone or iPad.
  • The workflow needs Safari 6 or later on the Mac and the Web Inspector toggle enabled under Settings → Safari → Advanced on the iOS device.
  • Windows and Linux cannot run the native Web Inspector because desktop Safari is not maintained for either platform; JSConsole and iOS emulators for PC are the available workarounds.
  • Since iOS 16.4, the same Web Inspector pairing also attaches to Chrome, Firefox, and other browsers built on Apple's WKWebView engine, not just Safari.
  • Console output, DOM changes, and JavaScript errors from the mobile page all appear inside the same desktop Web Inspector window used for local development.

Remote Debugging iOS Safari on OS X

Before starting with the debugging process, you would need a device running iOS. It may be any device like an iPad or an iPhone which can be connected to a Mac computer by USB, plus the right iOS testing tools. Safari version 6 or later must be installed on the computer. Without a Mac, you can test on Safari browsers online instead.

The next step demands you to enable ‘Web Inspector’ on your iOS device. This can very easily be done by going to Settings > Safari > Advanced. Toggle the ‘Web Inspector’ so that it gets enabled in case it was not by default.

After successfully enabling ‘Web Inspector’, you should also enable the ‘Develop’ menu in Safari on your Mac computer, covered in the Safari Developer menu guide. This can be done by going to Safari > Preferences > Advanced and checking the checkbox for Show Develop menu in menu bar. In case it is already enabled, you do not need to do anything.

Further, you need to open the web page you want to debug on your computer. Make sure that your iOS device is plugged into it. Go to Develop > iOS Device Name in desktop Safari browser. Click on the page you want to debug.

Finally, you can view and update the Document Object Model, have access to JavaScript console and other options and features.

Note

Note: Try LT Debug Chrome Extension for debugging websites!

What Changed for Remote Debugging Chrome and Firefox on iOS?

iOS 16.4, released in March 2023, changed how remote debugging works on iOS. Before that release, WKWebView blocked Web Inspector access in release builds, so only Safari itself could be attached to for remote debugging.

Apple's App Store rules require every iOS browser to embed WKWebView rather than ship its own rendering engine, which is why this one change affects every third-party browser at once.

Google's Chrome team documented the update when they added matching support to Chrome for iOS. The same Develop menu workflow described above now attaches to any WKWebView-based browser tab open on a connected iOS device.

Go to Develop > iOS Device Name in desktop Safari and the list now shows Chrome, Firefox, and other WKWebView-based sessions alongside Safari. A developer already using Chrome DevTools for cross-browser testing on desktop can extend the same habits to an iOS device.

Teams running automated checks increasingly pair this with Playwright testing on iOS real devices, which captures the same console and network data programmatically instead of through manual pairing.

Remote debugging iOS Safari on Windows and Linux

Safari was never released for Linux, and Apple stopped updating Safari for Windows years ago, which is why remote debugging from either platform needs a workaround, such as a cloud service to test Safari on Linux.

Although not many options are available for remote debugging Safari from Windows or Linux, the situation is not as hopeless as it seems. A popular way out is to call an application called JSConsole, one of the best debugging tools available without a Mac, to your rescue. The application works in an interesting way by inserting a script tag into the target web page that overrides the console behavior.

To begin with, go to jsconsole.com and execute: listen in the prompt. This will present you with a unique session ID and a script tag which you further insert into your mobile web page. Hence, any console output that your mobile page generates will be shown on the console open in your desktop web browser. This includes all the errors too. Thus, this gives you an alternate path to remotely debug iOS Safari. Although, it is not a replacement for a full web inspector, in fact, stands nowhere near to it, but is a good way out when you don’t have access to Mac.

Developers without a Mac can also try iOS emulators for PC to approximate the device environment, though neither method matches native Web Inspector access.

Thus, this was a quick overview of the process of remotely debugging iOS Safari both on Mac as well as non-Mac platforms. Happy debugging!

Test your website on the TestMu AI real device cloud

Author

...

Saif Sadiq

Blogs: 10

  • Twitter
  • Linkedin

Saif Sadiq is a community contributor with 7+ years of experience working across product, growth, and developer-focused platforms. Currently Director of Product & Growth at Apptile, he leads product strategy and cross-functional execution for no-code mobile app tooling. Saif previously worked at TestMu AI, contributing to product and growth initiatives for a cloud-based cross-browser testing platform, and has been recognized as a most-viewed blogger and writer.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Remote Debugging iOS Safari FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests