Skip to content

WebSocket Capture ​

Every WebSocket connection and frame is captured automatically β€” no configuration needed.


Overview ​

The WS tab in DEVTOOLS captures all WebSocket traffic in real time. Perfect for debugging real-time applications, reverse engineering WebSocket APIs, and understanding live data flows.

Capture TypeDescription
Connection openWhen a WebSocket connection is established
Outgoing framesData sent from browser to server
Incoming framesData received from server
Connection closeWhen connection ends (with code and reason)

Frame Types ​

DirectionLabelColorDescription
OutgoingUP SENT🟒 GreenData sent from the browser to the server
IncomingDN RECVπŸ”΅ BlueData received from the server
OpenOPEN🟑 YellowConnection established
CloseCLOSEDπŸ”΄ RedConnection closed with code and reason

Viewing Frames ​

List View ​

The main table shows:

ColumnDescription
TimeTimestamp of the frame
DirectionUP SENT or DN RECV
TypeText, Binary, Open, Close
SizeFrame size in bytes
PreviewFirst 50 characters of data

Detail Panel ​

Click any frame to see full details:

  • Formatted view β€” JSON pretty-printed (if applicable)
  • Raw view β€” Raw text or hex dump
  • Headers β€” Connection metadata

Binary Frames ​

Binary frames are decoded from base64 and displayed as a hex dump with ASCII preview:

0000  48 65 6c 6c 6f 20 57 6f  72 6c 64 0a 00 00 00 00  Hello Wo rld.....
0010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........

Hex Dump Features ​

FeatureDescription
OffsetByte position in hex
Hex valuesRaw bytes in hexadecimal
ASCII previewHuman-readable characters on the right
Non-printableShown as . in ASCII view

Download Binary Frames ​

Click DOWNLOAD to save the full raw binary frame to a file.


JSON Frames ​

JSON frames are auto-pretty-printed in the detail panel:

json
{
  "type": "message",
  "data": {
    "user": "john_doe",
    "text": "Hello world",
    "timestamp": 1700000000000
  }
}

Features ​

  • βœ… Syntax highlighting
  • βœ… Collapsible sections
  • βœ… Copy as JSON
  • βœ… Raw text also selectable

Testing WebSocket Capture ​

Navigate to any of these test sites in the BROWSER tab to see live WebSocket frames:

SiteDescription
pieSocket TesterInteractive WebSocket tester
SocketsBayMulti-protocol test
WebSocket.org Echo TestEcho server

Test Steps ​

  1. Open the BROWSER tab
  2. Navigate to a test site
  3. Switch to DEVTOOLS β†’ WS tab
  4. Watch frames appear in real time

Real-World Use Cases ​

Debugging Chat Applications ​

Capture WebSocket frames to see:

  • Message payloads
  • User join/leave events
  • Typing indicators
  • Read receipts

Reverse Engineering Live APIs ​

WebSocket APIs are often undocumented. Capture frames to:

  • Understand message structure
  • Identify authentication flows
  • Replay captured frames
  • Build your own client

Monitoring Trading Data ​

For stock/crypto trading platforms:

  • Real-time price updates
  • Order book changes
  • Trade executions
  • Market depth

Game Development ​

Debug multiplayer game WebSockets:

  • Player positions
  • Game state updates
  • Chat messages
  • Matchmaking events

Exporting WebSocket Data ​

Copy Frame ​

Select a frame β†’ COPY β†’ Copies frame data to clipboard

Download Frame ​

Select a frame β†’ DOWNLOAD β†’ Saves frame to file

Save Session ​

Use Session Management to save all captured WebSocket frames for later analysis.


Filtering WebSocket Frames ​

Use the filter bar to find specific frames:

FilterExample
By directionup or down
By typetext, binary, open, close
By contenterror, message, ping

Capture Details ​

What's Captured ​

ItemCaptured?
Frame directionβœ… Yes
Frame typeβœ… Yes
Payload dataβœ… Yes
Timestampβœ… Yes
Frame sizeβœ… Yes
Connection URLβœ… Yes
Close code/reasonβœ… Yes (for CLOSED frames)

What's NOT Captured ​

ItemReason
Compression stateInternal to WebSocket
Fragment boundariesReassembled automatically
Extension dataNot exposed by Qt

Performance ​

MetricValue
Max frames per second~1000
Max frame size10MB
Memory limitConfigurable

Note: Very high-frequency WebSocket traffic may impact performance. Use the CLEAR button to reset captured data.


Troubleshooting ​

No Frames Appearing ​

Solutions:

  • Ensure WebSocket connection is established
  • Check the site actually uses WebSockets (not all do)
  • Refresh the page to trigger connection
  • Check DEVTOOLS is open

Binary Frames Show Garbage ​

Explanation: Binary data may be compressed or encrypted

Solutions:

  • Download raw binary frame
  • Use external tools to decode
  • Check if data is compressed (gzip, deflate)

Frames Missing ​

Possible causes:

  • Capture started after connection
  • Frames sent before DEVTOOLS opened
  • Frame size exceeds limit

API Reference (for Developers) ​

The WebSocket capture data is available programmatically via:

cpp
// C++ access (for plugin developers)
QVector<WebSocketFrame> frames = capture->webSocketFrames();
for (const auto& frame : frames) {
    qDebug() << frame.direction << frame.data;
}

For Piggy users, see Network Capture.


Next Steps ​


Nothing Ecosystem Β· Ernest Tech House Β· Kenya Β· 2026

MIT Licensed | Built by Ernest Tech House Β· Kenya Β· 2026