capture_ws_payloads
Record WebSocket messages sent and received to debug JSVMP bytecode transfers. Set duration and optional URL filter.
Instructions
Patch the page's WebSocket constructor and record every connection's send/recv.
Use this when VMP fetches its bytecode over WebSocket (e.g. an onmessage pushes an opaque blob that is then assembled into a Worker or eval'd).
Args: duration_ms: how long to keep the patch alive after install. url_filter: if set, only record connections whose URL contains this string. max_events: ring buffer cap.
Returns: dict with connections[] (url, sent[], received[]), events[].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | ||
| max_events | No | ||
| url_filter | No | ||
| duration_ms | No |