Outcome
By the end of this tutorial you will have:- a filtered protocol trace snippet from
protocol-inspector - replay snapshot windows from
replay-lab - a mapped timeline from user action to runtime message patterns
Setup
- Start host and app surfaces from
developer-experience/apps. - Open two browser windows for
infinite-room-workspace. - Open one window each for
protocol-inspectorandreplay-lab. - Set all windows to the same room id.
Step 1: Establish baseline session
In first workspace window:- connect in
npm sdk + wasm - apply shared document action once
- connect in
npm sdk + wasm - publish presence
- peer lifecycle and presence events appear in protocol inspector.
Step 2: Capture protocol evidence
Inprotocol-inspector:
- apply preset
Peer lifecycle - apply preset
Presence - export trace snippet
- timestamp, event types, and message ordering
Step 3: Capture replay evidence
Inreplay-lab:
- capture snapshot before new action
- perform new workspace action (text update or signal)
- capture snapshot after action
- use range controls to inspect event windows around the change
- before/after snapshot event windows
Step 4: Build your action-to-runtime map
Create a short mapping:- Action: what user did
- Protocol message types: what you observed
- Replay window evidence: what changed in captured event ranges
Related docs
protocol/websocket-messagesapi-reference/websocket-commandsguides/replay-debugging