在 Chrome 中请求监控 [英] Request Monitoring in Chrome

查看:60
本文介绍了在 Chrome 中请求监控的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Firefox 中,我使用 Firebug,它允许我查看我的 ajax 调用发出的每个 http 请求.我已经将我的开发切换到 Chrome,到目前为止我很喜欢它.然而,我唯一的抱怨是开发人员工具似乎不允许您查看每个 ajax 请求.我曾经遇到过一次资源面板显示对同一资源的多个请求的情况,但它只发生过一次,以后再也没有发生过.

In Firefox, I use Firebug which allows me to view every http request my ajax calls are making. I've switched over my development to Chrome and am liking it so far. My only complaint, however, is that the developer tools don't seem to allow you to view each ajax request. I've had it happen once where the Resources panel showed multiple requests to the same resource, but it's only done it once and never again.

有没有办法从 Chrome 中可靠地查看页面通过 javascript 发出的每个 http 请求?

Is there a way to reliably see every http request that a page is making through javascript from within Chrome?

目前,为了解决这个问题,我在 Chrome 旁边运行 Fiddler 来查看我的请求,但如果有办法在浏览器中执行此操作,我更愿意这样做.

Currently, to get around this, I'm running Fiddler next to Chrome to view my requests, but if there's a way to do it from within the browser, I'd prefer that.

推荐答案

我知道这是一个旧线程,但我想我会插话.

I know this is an old thread but I thought I would chime in.

Chrome 目前内置了一个解决方案.

Chrome currently has a solution built in.

  1. 使用 CTRL+SHIFT+I(或导航到 Current Page Control > Developer > Developer Tools.在较新版本的 Chrome 中,单击扳手图标 >工具 > 开发人员工具.)以启用开发人员工具.
  2. 在开发者工具中点击Network 按钮.如果尚未启用,请为会话启用它或始终启用它.
  3. 点击XHR"子按钮.
  4. 发起一个 AJAX 调用.
  5. 您将看到项目开始显示在 资源" 下的左栏中.
  6. 单击资源,将有 2 个选项卡显示标题和返回内容.
  1. Use CTRL+SHIFT+I (or navigate to Current Page Control > Developer > Developer Tools. In the newer versions of Chrome, click the Wrench icon > Tools > Developer Tools.) to enable the Developer Tools.
  2. From within the developer tools click on the Network button. If it isn't already, enable it for the session or always.
  3. Click the "XHR" sub-button.
  4. Initiate an AJAX call.
  5. You will see items begin to show up in the left column under "Resources".
  6. Click the resource and there are 2 tabs showing the headers and return content.

这篇关于在 Chrome 中请求监控的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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