How to Remotely Debug Web Pages in iOS Safari
Inspect a live iPhone or iPad webpage from your Mac with Safari Web Inspector. Follow the setup, troubleshoot connection issues, and choose a simulator when needed.
To remotely debug a webpage open in Safari on an iPhone or iPad, enable Web Inspector on the device, connect it to a Mac, enable Safari’s developer features on the Mac, and choose the device and page from Safari’s Develop menu. Apple’s documented setup starts with a cable connection; after that, you can enable network connection for wireless inspection.
What you need
- An iPhone or iPad running iOS or iPadOS with the page open in Safari.
- A Mac with Safari.
- A cable compatible with both devices that supports data. The connector varies by device; a charging-only cable may not work.
- Permission to trust the Mac on the device if a trust prompt appears.
You can use a simulator on macOS instead of a physical device when you do not need to reproduce behavior tied to real hardware or device conditions.
Set up remote inspection with a cable
- Enable Web Inspector on your iPhone or iPad. Open Settings > Apps > Safari > Advanced and turn on Web Inspector. Menu labels can vary slightly by OS version.
- Connect the device to your Mac. Use a data-capable cable. If the device asks whether to trust this Mac, approve it and enter the device passcode if requested.
- Enable developer features in Mac Safari. In Safari, open Safari > Settings > Advanced and enable the developer features option. WebKit’s instructions also require Web Inspector to be enabled on the Mac.
- Open the page on the device. Navigate to the page you want to inspect in Safari on the iPhone or iPad.
- Open the page inspector on the Mac. In Mac Safari, open the Develop menu, select the connected device, then select the page. Safari opens Web Inspector for that page.
Apple documents this flow for inspecting Safari webpages and other inspectable content. See Apple’s iOS and iPadOS inspection guide and WebKit’s Web Inspector setup instructions.
Inspect a page and reproduce the bug
Once Web Inspector opens, use its available inspection tools to examine the live page while it remains open on the device. Reproduce the problem on the iPhone or iPad and observe the corresponding page state in the inspector. This is useful for issues that depend on the actual device, browser, viewport, or interaction.
Keep the page active on the device while investigating. If you navigate away, close the tab, or select a different target, the inspector may detach or show a different page. For a bug report, note the device and OS version, the page URL, the steps that reproduce the issue, and whether the same behavior occurs on a simulator or desktop browser.
Enable wireless inspection
Apple’s documented wireless flow requires an initial cable connection:
- Complete the cable setup above and confirm the device appears under Safari’s Develop menu.
- In the Mac Safari Develop menu, open the device submenu and enable Connect via Network.
- After the network connection is available, select the device and page from Develop as you would with a cable connection.
If the device does not appear over the network, reconnect it by cable and confirm Web Inspector and trust settings before troubleshooting Wi-Fi. Apple also describes connecting through Xcode as an alternative route.
Choose a physical device or simulator
| Route | Use it when | Limit |
|---|---|---|
| Physical iPhone or iPad | The issue may depend on real device hardware, OS behavior, touch input, or device conditions. | Requires a compatible data connection for initial setup and an inspectable page or app target. |
| iOS or iPadOS simulator on macOS | You need to test without a physical device, or want a repeatable development environment. | It may not reproduce behavior tied to physical hardware or conditions. |
Currently booted iOS and iPadOS simulators appear in Safari’s Develop menu, and Web Inspector is enabled for simulators. Apple describes simulators as a way to test webpages and apps on macOS without a physical device.
What content can Web Inspector show?
Safari can expose webpages, service workers, Home Screen web apps, extensions, and web content inside apps when that content is configured to be inspectable. Embedded content is not automatically available in every app: the app developer must make the relevant web view or JavaScript context inspectable.
If you are debugging a page inside an app, first confirm with the app’s developer or source code that its WKWebView or JavaScript context is configured for inspection. If it is not, the target will not appear just because Web Inspector is enabled on the device.
Or skip the browser setup
For a screenshot of a page state rather than a live interactive debugging session, ScreenshotNeo provides a website screenshot API and MCP server. A screenshot cannot replace Safari Web Inspector when you need to inspect live DOM behavior, but it can capture a page without setting up a remote browser connection.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Python example:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
Node.js example:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer())));
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The iPhone or iPad is missing from Develop. | Web Inspector is off, the cable does not carry data, the device has not trusted the Mac, or the Mac’s developer features are off. | Enable Web Inspector on the device, reconnect with a data-capable cable, accept the trust prompt, and enable developer features in Safari on the Mac. |
| The Develop menu or developer tools are unavailable. | Safari developer features are not enabled on the Mac. | Open Safari Settings > Advanced and enable the developer features option. Confirm Web Inspector is enabled on the Mac as well. |
| The device appears, but the webpage does not. | The target page is not currently open in Safari on the device, or you are looking in the wrong device submenu. | Open the target page on the device, then reopen Develop and inspect that device’s submenu. |
| Wireless inspection does not connect. | The device has not completed the initial cable setup, or Connect via Network is not enabled. | Connect by cable first, confirm the device appears, enable Connect via Network in its Develop submenu, then try again. |
| An app’s embedded page is missing. | The app has not exposed its web content or JavaScript context for inspection. | Ask the app developer to configure the relevant content as inspectable; device Web Inspector settings alone cannot expose every app. |
| The connection drops or the inspector shows stale state. | The page or device connection changed during inspection. | Keep the target tab open, reconnect the cable or network connection, and reselect the page from Develop. |
Reliability and practical notes
- Use the physical device to investigate bugs that may depend on actual hardware or device conditions; use a simulator when convenient repeatability matters more.
- Wireless inspection depends on completing cable setup first. Keep the cable available if discovery or the network connection becomes unreliable.
- For app content, inspectability is controlled by the app implementation. A missing target can be an app configuration issue rather than a Safari setting.
- There is no service cost for Apple’s documented Safari inspection workflow, though it requires a Mac and compatible device setup. A screenshot API is a separate option for capturing output, not a substitute for interactive debugging.
FAQ
Can I inspect an iPhone Safari tab from a Windows PC?
The documented workflow here uses Safari on a Mac and its Develop menu. Use a Mac for this Apple-supported setup.
Can I start wirelessly without connecting a cable once?
Apple’s documented network setup requires Web Inspector to be enabled and the device to have first connected to the Mac by cable.
Can I use Web Inspector for a page in any iPhone app?
No. The app must expose its web view or JavaScript context as inspectable.
Does a screenshot show the same information as remote debugging?
No. A screenshot records visual output. Remote Web Inspector is for examining and interacting with a live page.


