Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to inspect WebSocket frames in Chrome properly?

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?

Screenshot: enter image description here

like image 278
jayarjo Avatar asked May 24 '16 12:05

jayarjo


People also ask

Does Google Chrome support WebSockets?

Starting in the Google Chrome developer channel release 4.0. 249.0, Web Sockets are available and enabled by default.

How do I stop traffic on Google Chrome WebSockets?

When you want to turn off WebSockets, click on the TamperMonkey icon and the toggle switch to enable blocking. Refresh the page. Disable the script when you no longer want to block WebSockets.

How do I save a WebSocket frame in Chrome?

At this point, you can do whatever you want with the frames. I used the console. save utility from https://bgrins.github.io/devtools-snippets/#console-save to save the frames as a JSON file (included in the snippet below). This will save all incoming socket frames to your default download location.


1 Answers

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.

enter image description here

like image 152
cassiomolin Avatar answered Sep 27 '22 20:09

cassiomolin