Highlights
✨ Debug device WebViews from VS Code (and any Chrome-compatible debugger)
pymobiledevice3 webinspector cdp now serves the browser-level CDP endpoint advertised by /json/version (previously it was advertised but unrouted, so clients attaching through it — VS Code's js-debug foremost — failed with connection retries until timeout). The new endpoint implements the flat-session Target domain over the existing per-page translation: the full js-debug attach sequence, auto-attach, detach, and live announcement of pages opened/closed on the device.
One bridge instance now serves Chrome DevTools (per page, via the landing page) and browser-level clients such as VS Code or Puppeteer concurrently — WebKit still allows only a single inspector session per page, so different clients debug different tabs.
pymobiledevice3 webinspector cdpThen attach VS Code with a launch.json such as:
{
"name": "Attach to iPhone WebView",
"type": "chrome",
"request": "attach",
"address": "127.0.0.1",
"port": 9222,
"urlFilter": "*",
"webRoot": "${workspaceFolder}"
}Editor breakpoints, stepping, the Debug Console, Loaded Scripts, and source maps all work against the device.
📚 New WebView debugging guide
A new guide, WebView debugging, covers device prerequisites (Web Inspector toggle, WKWebView.isInspectable), the Chrome DevTools flow, the VS Code setup, and the caveats.
What's Changed
- bc9dd9e Merge pull request #1816 from doronz88/feature/cdp-browser-endpoint (#1816) (@doronz88)
- 97e5d20 docs: add WebView debugging guide (Chrome DevTools / VS Code attach) (#1816) (@doronz88)
- d5ec1e5 webinspector: serve the browser-level CDP endpoint for VS Code js-debug attach (#1816) (@doronz88)
Full Changelog: v10.2.3...v10.3.0