How to see WebSocket messages going through a tunnel
Since app version 1.4.0
Open a WebSocket connection's row in the inspector's log and its "Messages" tab: it shows every message between the visitor and your service, both ways. Messages are recorded on the Pro and Ultra plans (what the inspector does for free).
Steps
- Open an HTTPS tunnel's "Requests" tab (how to open the inspector).
- Connect to the service through the tunnel's link, for example
wss://…/ws. The log gets a row with the status 101 and the mark "messages: N". - Pick that row and the "Messages" tab in the request panel.
What it shows
- Every message in order: "from the visitor" or "from the service", the time, the size and the text. A binary message is shown as bytes, a closing message with its code.
- New messages are added while the connection is open.
- Passwords and tokens in the messages stay hidden until you click "Show secrets in messages".
- The "More" button shows the next messages when there are many.
The inspector keeps a connection's last 1000 messages and 1 MB: for older ones it says how many there were. The inspector cannot send a message, only show them.
Check
Send a message from your WebSocket client: the "Messages" tab gets a "from the visitor" line, then the answer "from the service" if the service answered.