github doronz88/pymobiledevice3 v11.9.1

latest release: v11.9.2
2 hours ago

Highlights

🐛 Web Inspector CDP: debugging a large script no longer hangs or crawls

Debugging over CDP from WebStorm or Chrome (pymobiledevice3 webinspector cdp) against a large script used to hang and crawl: a large evaluate appeared to hang until your next action, step-over often did not land, and the Scope panel came back empty. Three separate causes, each measured on a device against a ~1 MB script, are fixed:

  • Withheld replies. iOS 26 WebKit occasionally holds a request's reply - and the events that follow it, such as the Debugger.paused after a step - until the next message reaches the page. Half of all step-overs in a large script stalled this way. A watchdog now nudges the page while any reply is outstanding, so a withheld reply is freed within ~0.3 s instead of waiting for your next click. Covers page targets and JSContexts alike.
  • The idle spin. The bridge spun a core polling for nothing - 23% of a CPU while the debugger sat idle at a breakpoint. It now measures ~4%, with no throughput cost.
  • Empty scopes on a big function. Runtime.getProperties went through a five-second internal wait that also froze event delivery, so a large scope's variables came back empty and every pause stalled for five seconds. It is now forwarded without blocking; a 45k-variable scope returns in full.

One platform limit, now documented: the manual pause button cannot interrupt JavaScript already busy in a tight loop - WebKit handles inspector messages on the page's own JavaScript thread, so the pause lands when the script next yields. Armed while the page is idle it stops the next code that runs, as in Chrome.

pymobiledevice3 webinspector cdp
# attach WebStorm or Chrome DevTools, set a breakpoint in a large script, and step

What's Changed

  • 0b504f0 cdp: Keep the debugger responsive - free withheld replies, stop the idle spin, fetch big scopes (#1923) (@doronz88)

Full Changelog: v11.9.0...v11.9.1

Don't miss a new pymobiledevice3 release

NewReleases is sending notifications on new releases.