# Set up Web Inspector for Device Lab reads

> Pair an iPhone with a Mac, open Web Inspector on Safari tabs and Home Screen web apps, and read page state the way the Device Lab records instrumented reads.

import LabProvenance from '@components/lab/LabProvenance.astro';

An instrumented read, confidence label A, is an agent-measured read stored verbatim in the data package's `raw/` folder ([report](https://openpwa.net/research/2026-10-ios18-home-screen-web-apps/data/REPORT.md), sections 5.2 and 5.4). In the 2026-10-20 run the reads came over the Web Inspector protocol, except some tab values read through WebDriver (`safaridriver`). To read through Web Inspector, connect the device to a Mac with a cable, then read the Safari tab and Home Screen app separately. Apple's reference is [Inspecting iOS and iPadOS](https://developer.apple.com/documentation/safari-developer-tools/inspecting-ios) (developer.apple.com); the panels themselves are described in [Web Inspector](https://webkit.org/web-inspector/) (webkit.org).

## Pair the iPhone and the Mac

1. On the iPhone, open Settings > Apps > Safari > Advanced and turn on **Web Inspector**.
2. On the Mac, open Safari > Settings > Advanced and turn on **Show features for web developers**. The **Develop** menu appears ([Enabling Developer Features](https://developer.apple.com/documentation/safari-developer-tools/enabling-developer-features), developer.apple.com).
3. Connect the iPhone by cable, unlock it and tap **Trust** if it asks.
4. In Safari on the Mac, open **Develop** > *your iPhone's name*. Open Safari tabs and running Home Screen web apps are listed; service workers may be listed as separate entries. Choose one to open its console.

If a page you need is not listed, record `could-not-run (not inspectable)` for that step and continue. Note the Mac's macOS and Safari versions in the environment block.

## Take a read

To take a read, run a probe snippet in the page's console and save its output. Use the probe scripts the Lab published with its data, in `tools/` of the [iOS 18.6.2 data package](/research/2026-10-ios18-home-screen-web-apps/data/), or the harness page's own panel. Paste the probe, run it, and save the console output as a file named after the step, the context and the page, for example `<date>-<os>-<step>-app-lab.json`. Record the time of each read in UTC.

### Reading a Safari tab

Open the harness page in Safari, then choose it under **Develop** > *your iPhone's name*. The tab is listed under Safari. Tab-side results are labelled `tab`.

### Reading a Home Screen app

Launch the app from its icon and keep it in the foreground. A Home Screen web app runs in its own process, so it is listed as its own entry, apart from Safari. Pages can be read only while they are in the foreground; if the phone locks or the app goes to the background, bring it back before you read. App-side results are labelled `app`.

## Keep the reads clean

The probes are read-only. They evaluate feature detects, `matchMedia` queries, geometry and storage contents, and do not call `requestPermission()`, `subscribe()`, `share()`, `install()`, `register()` or `persist()`. Permission and subscription changes therefore come from the operator's taps on harness buttons, and the record shows which step caused them. The harness pages still do their own work when they load, such as registering their service worker. A read still runs JavaScript in the page (a hidden element for `env()` insets, a temporary property); the [methodology page](/lab/methodology/) lists that as a threat to validity.

For scripted reads, the Lab used [ios_webkit_debug_proxy](https://github.com/google/ios-webkit-debug-proxy) (github.com) for the WebKit remote inspector protocol and `safaridriver` for automated tab reads. A `safaridriver` session opens an automation window with its own empty website data, so no storage result should come from it. Close any Mac Web Inspector window attached to the phone before a scripted read.

## Privacy in reads

Push subscriptions are read as endpoint host only; the probes print `web.push.apple.com` and drop the path and keys. Redact other sites' URLs from any list of inspectable pages before you keep it, and keep the device UDID, serial number and account names out of saved files and scripts. Fill in the environment block (see the [iPhone and iPad guide](/lab/guides/iphone-ipad/)) and compare the served files with [/lab/harness/v1/SHA256SUMS.txt](/lab/harness/v1/SHA256SUMS.txt) before and after the run. Reset to fresh state (remove the icon, clear website data) where a test asks for it.

<LabProvenance locale="en" />