Debugging websockets using Chrome turns out to be quite simple.
Here is a step by step guide:
-
Hit F12 to open the Developer Tools in Chrome
-
Go to the Network tab and select the "WS" filter to only show WebSocket connections.
-
Open a page where you are using websockets. You should see a request appear in the list.
-
Click on the name of the request, and select the tab "Frames".
-
Messages triggered by your client are shown in green, while messages from the server are white.