您如何使用 Chrome 开发人员工具检查 websocket 流量? [英] How do you inspect websocket traffic with Chrome Developer Tools?

查看:53
本文介绍了您如何使用 Chrome 开发人员工具检查 websocket 流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Chrome 开发人员工具检查 websocket 流量.根据我的研究,您似乎应该能够使用网络选项卡看到它 - 它甚至有一个ws"过滤器.

I'm trying to inspect websocket traffic using Chrome Developer Tools. From my research it seems you should be able to see it using the network tab - and it even has a filter for 'ws'.

然而,我一直在检查我知道使用 websockets 的站点,但找不到一种方法来检查来回发送的消息.使用 Chrome v56,也试过 Safari 没有运气...

However I've been inspecting sites that I know are using websockets and can't find a way to inspect the messages being sent back and forth. Using Chrome v56, also tried Safari with no luck...

有谁知道这是如何实现的?

Does anyone know how this can be achieved?

推荐答案

您需要在打开网络选项卡的情况下重新加载页面并按类型ws"进行过滤.这将向您显示正在与 websocket 建立的连接.然后,您可以单击连接以显示在服务器上来回发送的流量

You need to reload the page with the network tab open and filter by type 'ws'. This will show you a connection being made with a websocket. You can then click on the connection to show the traffic being sent back and forth with on the server

https://developers.google.com/web/tools/chrome-devtools/network-performance/reference#frames

这篇关于您如何使用 Chrome 开发人员工具检查 websocket 流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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