How to view WS/WSS Websocket request content using Firebug or other?

后端 未结 8 2115
梦毁少年i
梦毁少年i 2020-12-02 11:13

Is there a way to view the Websocket traffic?

Only Websocket headers are visible on the initial handshake.

Everything disappears after the response:

相关标签:
8条回答
  • 2020-12-02 11:42

    In firefox you can open developer toolbar (Shift+F2) and see websockets in Network tab. You can use filtering at the bottom of the tab (choose Other for websockets).

    0 讨论(0)
  • 2020-12-02 11:51

    Not as comfortable as the other options mentioned here, but a universal tool that can help you in various situations: Use wireshark. With some knowledge about TCP you can debug problems that the other tools mentioned can not solve (unexpected disconnections, ...), because they work on a level that's too high. You can also (just as in Firebug, etc) read the actual websocket messages.

    The disadvantage of wireshark is that it's rather cumbersome to work with encrypted connections.

    Give it a try, I use it all the time to debug a Rails app which communicates with a Python websocket backend.

    0 讨论(0)
提交回复
热议问题