在浏览器开发工具中看不到 SignalR 流量 [英] Can't see SignalR traffic in browser development tools

查看:30
本文介绍了在浏览器开发工具中看不到 SignalR 流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了使用 SignalR 的服务器和客户端代码.该网站运行良好,但我在任何浏览器(chrome、IE、Firefox)中都看不到网络流量.我知道有网络流量是因为网站正在运行.

I built server and client code that uses SignalR. The website is working perfectly, but I can't see the web traffic in any browser (chrome, IE, Firefox). I know the web traffic is there because the website is working.

有没有办法在浏览器中查看 SignalR 流量?如果不是,查看 SignalR 流量的最佳外部工具是什么?

Is there a way to view SignalR Traffic in a browser? If not what is the best external tool for viewing SignalR traffic?

推荐答案

是的,您可以在开发者工具中查看 SignalR 流量(使用 Chrome 测试).

Yes, you can view SignalR traffic in Developer Tools (Tested with Chrome).

  1. 打开网络标签.

  1. Open Network Tab.

点击WS"过滤掉除 Web Socket 流量之外的所有流量.

Click on "WS" to filter out all except Web Socket traffic.

刷新页面.您将看到类似这样的内容,表明已建立连接.请注意,您只会看到这一行,因为它仅显示 Web 套接字已连接.此处没有像您预期的那样显示额外的流量(见下文)

Refresh Page. You will see something like this that shows you the connection was established. Note that you will only see this one line as it only shows that the web socket was connected. Additional traffic is not shown here like you might expect (see below)

  1. 然后单击该行,它会显示详细信息.然后选择消息"选项卡.然后它将实时显示正在发送和接收的消息.单击消息以查看二进制信息.

这篇关于在浏览器开发工具中看不到 SignalR 流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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