如何正确检查 Chrome 中的 WebSocket 帧? [英] How to inspect WebSocket frames in Chrome properly?

查看:24
本文介绍了如何正确检查 Chrome 中的 WebSocket 帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照建议输入了

解决方案

截至 2019 年 12 月 10 日,使用 Chrome 调试 WebSockets 的过程略有不同.

  1. 打开 Chrome 开发者工具.
  2. 点击网络标签.
  3. 点击过滤器 WS(对于 WebSockets).
  4. 重新加载页面以确保您在名称列中看到您的连接.
  5. 点击消息.

现在您应该看到您与 WebSocket 的所有通信,包含 3 列:数据、长度和时间.

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:

解决方案

As of December 10, 2019, the process is slightly different to debug WebSockets with Chrome.

  1. Open Chrome Developer Tools.
  2. Click on the Network tab.
  3. Click on the filter WS (for WebSockets).
  4. Reload the page to make sure you see your connection in the Name column.
  5. Click on Messages.

Now you should see all your communications with your WebSockets, with 3 columns: Data, Length and Time.

这篇关于如何正确检查 Chrome 中的 WebSocket 帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆