Just like debugging any other thing, doing the same for websocket traffic can be really useful. Not sure if firebug does that, but inspecting your websocket traffic in chrome dev tools is definitely possible.
Some Code First
Whenever dealing with websockets, I find myself mostly working with Node.js and Socket.IO. You can setup a quick node server that does websocket data transfer back and forth with socket.io. Check out some code here to get started.
What's the one thing every developer wants? More screens! Enhance your coding experience with an external monitor to increase screen real estate.
If you are reading this post, then you probably already have an app that’s leveraging the power of websockets to do something in realtime.
How to Inspect ?
Take the following steps:
- Open Chrome Dev Tools.
- Click Network Tab.
- Filter the traffic by clicking WebSockets in the bottom-most bar.
- Find your proper websocket connection and click it.
- Now you will see a new pane appear with Headers and Frames tab. Click the Frames tab.
Note: Unfortunately, the Frames pane showing messages does not refresh automatically in realtime. To refresh the data table, click that connection again from the Network tab’s Name Column.
Chrome version used is 22, but I also remember inspecting in Chrome 20 or so.
Happy WebSockets Debugging!