简体   繁体   English

如何禁用chrome开发工具自动网络录制?

[英]How to disable chrome developer tools automatic network recording?

In chrome developer tools, every time a page loads I click on "Network" tab and see the "record" button active / red. 在Chrome开发人员工具中,每次加载页面时,我单击“网络”选项卡,然后看到“记录”按钮激活/红色。 Even if I disable the recording of network traffic, when I refresh the same page or open another website I see that Chrome is recording traffic in the "Network" tab. 即使我禁用网络流量录制,当我刷新同一页面或打开其他网站时,我发现Chrome正在“网络”标签中记录流量。

When developing big web applications that have A LOT of traffic - 3rd party apis, statics CDNs from Amazon, Google and all the app's assets that must be downloaded like images, js files, css files, etc etc - this "Network" tab works very slowly and my browser gets stuck a lot. 在开发具有大量流量的大型Web应用程序时 - 第三方api,来自亚马逊的静态CDN,Google以及必须下载的所有应用程序资产,如图像,js文件,css文件等等 - 此“网络”选项卡非常有效慢慢地,我的浏览器卡住了很多。 This causes my development time to be less productive because I must wait every time I want to check something in the "Networks" tab. 这会导致我的开发时间降低,因为每次我想在“网络”选项卡中检查某些内容时我都必须等待。

Can I turn the recording off by default? 我可以默认关闭录音吗? Can the "Record" button be grey and when I want it to start recording I just click on it and start seeing the traffic? “录制”按钮可以是灰色的,当我想要它开始录制时,我只需点击它并开始看到流量?

I don't know of an option to turn off the default recoding BUT you can do the following: 我不知道关闭默认重新编码的选项但您可以执行以下操作:

  1. Open a new empty tab 打开一个新的空选项卡
  2. Hit F12 点击F12
  3. Disable Network Recording 禁用网络录制
  4. Paste the url of your application to the adressbar 将应用程序的网址粘贴到地址栏

This way you don't have to load the page once before disabling network recording, which is your problem from what I understand, because you have a lot of resources loading. 这样您就不必在禁用网络录制之前加载页面一次,这是我理解的问题,因为您有很多资源加载。

2018 solution: The only thing that works for me is opening this page: 2018解决方案:唯一对我有用的是打开此页面:

chrome://serviceworker-internals/

And then Unregister and Stop all workers there. 然后UnregisterStop那里的所有工作人员。

There's a button in the top left of the Network Panel. 网络面板的左上角有一个按钮。 It looks like a little red circle, you can hit that to stop recording network events. 它看起来像一个小红圈,你可以点击它来停止录制网络事件。

I just disabled it, refreshed this page and saw nothing in there. 我刚刚禁用它,刷新了这个页面并且没有看到任何内容。 Is something like that what you were looking for? 是那样你想要的东西?

By default, it's not recording anything until you have the F12 tools open (even though the circle is red when you first open it). 默认情况下,在您打开F12工具之前,它不会记录任何内容(即使第一次打开它时圆圈是红色的)。 If you don't have the F12 tools open, it won't record the history. 如果您没有打开F12工具,则不会记录历史记录。 When you first open it, if you notice at the bottom, it tells you that nothing has been cached, and refresh the page if you want to see the network traffic. 当您第一次打开它时,如果您注意到底部,它会告诉您没有缓存任何内容,如果您想查看网络流量,请刷新页面。 If, when you open the F12 tools, your site is still doing a lot of traffic, it'll start reporting it at that point, but nothing prior. 如果,当您打开F12工具时,您的网站仍在进行大量流量,那么它将在此时开始报告,但之前没有任何内容。

I'm pretty dubious that it's the source of your slow-down. 我很怀疑它是你减速的源头。 It's really just capturing all the HTTP traffic and saving the request/responses, it's not a lot of work, very little in fact. 它实际上只是捕获所有HTTP流量并保存请求/响应,这不是很多工作,实际上很少。 The resources/profiles/timelines parts that can be more consuming are all off by default. 默认情况下, 可能更耗费的资源/配置文件/时间轴部分全部关闭。

这是在Reddit加载完成后立即打开F12工具

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM