Highlights
✨ Chrome DevTools' Memory and Performance panels now work over the CDP bridge
Until now the bridge stubbed HeapProfiler.enable and Profiler.enable and forwarded every other HeapProfiler, Profiler and Tracing method straight to WebKit, which answered "domain was not found" - so the Memory panel's Take snapshot and Collect garbage, the CPU profiler and the Performance panel did nothing, on pages and JSContexts alike. WebKit records the same things in formats of its own, and the bridge now converts them on the way to the frontend:
- Memory panel: heap snapshots (WebKit's
Heap.snapshotreshaped into V8's document, with WebKit's class names as constructors, its property/index/variable edges as V8's property/element/context edges, and engine internals grouped as (system) and (compiled code)), Collect garbage, and the allocation timeline. Object ids stay WebKit's, so an object picked in a snapshot still resolves. Allocation sampling has no WebKit counterpart: starting it is refused, and stopping it yields an empty profile rather than a hung panel. - CPU profiles (the Sources profiler and, on a JSContext, the Performance panel): WebKit's
ScriptProfilersamples become a Chrome call tree with 0-based locations, the inspector's own console-evaluation frames stripped, and idle samples inserted across gaps - WebKit samples only while script runs, and Chrome would otherwise charge idle time to the last sampled frame. - Performance panel on a page: a recording drives WebKit's
Timelineplus aScriptProfilerrecording and is delivered as a Chrome trace - main-thread tasks per timed record, function calls, timers, animation frames, style recalculation, layout, paint and composite under Chrome's names,console.timespans, the CPU profile for the flame chart, and screenshots (thinned to ten a second; WebKit captures every frame) when the Screenshots box is ticked.
pymobiledevice3 webinspector cdp
# open http://127.0.0.1:9222/, pick a page or JSContext, then use the Memory or Performance panelVerified with the pinned DevTools frontend on an iOS 26.4 device, and stress-tested (hundreds of snapshots, profiles and recordings, concurrent sessions, disconnects mid-operation, a 610k-node heap, a 45 s recording) with no failures and no memory growth. See the new Memory and Performance panels section of the WebView debugging guide for the details and the two known gaps.
🐛 A superseded page session no longer logs a traceback when its client already hung up
Reconnecting to the same page in quick succession makes a client supersede its own previous session; closing that session's socket raised in the bridge log when the client was already gone. Fixed.
What's Changed
- 2a88696 cdp: Keep at most ten screenshots a second in a trace; survive a superseded session's close (#1937) (@doronz88)
- a146c71 cdp: Finish an allocation-sampling stop with an empty profile; test the stop timeouts (#1937) (@doronz88)
- e295352 cdp: Drive Chrome's Memory and Performance panels from WebKit's profiling domains (#1937) (@doronz88)
Full Changelog: v11.10.4...v11.11.0