I've entered echo.websocket.org as it was suggested, opened Network tab and WS filter in Chrome Developer Tools, but I do not see any frames. I see connection entries, but Frames tab always stays empty. Is there anything special I should do to see the frames?
As of December 10, 2019, the process is slightly different to debug WebSockets with Chrome.
- Open Chrome Developer Tools.
- Click on the Network tab.
- Click on the filter WS (for WebSockets).
- Reload the page to make sure you see your connection in the Name column.
- Click on Messages.
Now you should see all your communications with your WebSockets, with 3 columns: Data, Length and Time.
Click Network, WS, select the original HTTP connection and then click the Frames tab. Be aware that the content of this tab may be hidden by another pane, so you need to drag the bar down to see the WebSocket frames.
As of December 10, 2019, the process is slightly different to debug WebSockets with Chrome.
- Open Chrome Developer Tools.
- Click on the Network tab.
- Click on the filter WS (for WebSockets).
- Reload the page to make sure you see your connection in the Name column.
- Click on Messages.
Now you should see all your communications with your WebSockets, with 3 columns: Data, Length and Time.
Did you send any data on the page? You need to try sending a message after clicking Connect
:
There is also a useful area in Chrome where you can view all your active sockets:
You can access it at here: chrome://net-internals/#events&q=type:SOCKET%20is:active
Update:
After seeing your newly added screenshot, it looks like your Data table is squashed up and you need to drag it down to see the entries.
Another gotcha is that in the new Edge the Developer Tools menu option and the Network/WS display looks very similar to Chrome. I forgot I was using Edge and spent 20 minutes trying to find the JSON messages, which I don't think are available in Edge.
There's another way you can have a problem here - if you are using livereload in your development flow.
This (apparently, for me at least) causes multiple instances of the socked to appear, all with empty messages.
It turns out that only the first one is the "real" one, and has messages:
© 2022 - 2024 — McMap. All rights reserved.