Chrome 中的请求监控

发布于 2024-08-12 10:25:17 字数 336 浏览 6 评论 0原文

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

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

[编辑:11/30/09 11:55]

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

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.

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

[Edit:11/30/09 11:55]

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

花期渐远 2024-08-19 10:25:17

我知道这是一个旧线程,但我想我应该插话。Chrome

目前有一个内置的解决方案。

  1. 使用 CTRL+SHIFT+I (或导航到 Current Page Control > Developer > ; 开发者工具 在较新版本的 Chrome 中,单击扳手图标 > 开发者工具。)以启用开发者工具。
  2. 在开发人员工具中单击网络按钮。如果尚未启用,请为会话启用它或始终启用它。
  3. 单击“XHR”子按钮。
  4. 启动 AJAX 调用
  5. 您将看到项目开始显示在“资源” 下的左列中。
  6. 单击资源,有 2 个选项卡显示标题和返回内容。

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

Chrome currently has a solution built in.

  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.
违心° 2024-08-19 10:25:17

对此的最新答案是:它们列在开发人员工具中的“网络”按钮下,不再像以前那样列在“资源”下。

The most up-to-date answer to this is: they are listed under the 'Network' button in the developer tools, no longer under 'Resources' like it used to be.

独自←快乐 2024-08-19 10:25:17

更新

Chrome 更改了检查请求的方式,并建议现在使用 Catapult Netlog Viewer,其中包含从 chrome://net-export/ 导出的日志

chrome://net-export/

更多信息

旧 Chrome 版本

您还可以在 Chrome 中使用此链接获取比检查员更详细的信息。

chrome://net-internals/#events

这显示了浏览器打开时所有请求的日志

Update

Chrome changed how to inspect requests and suggests now to use the Catapult Netlog Viewer with the logs exported from chrome://net-export/

chrome://net-export/

More Info

Old Chrome Versions

You also may use this link in Chrome for more detailed information than the inspector did it.

chrome://net-internals/#events

This shows the log of all requests of the browser while open

流殇 2024-08-19 10:25:17

不知道哪个 chrome 版本可用,但我找到了一个设置“控制台 - 记录 XMLHttpRequests”(单击 mac 上 chrome 中开发人员工具右下角的图标)

don't know as of which chrome version this is available, but i found a setting 'Console - Log XMLHttpRequests' (clicking on the icon in the bottom right corner of developer tools in chrome on mac)

独留℉清风醉 2024-08-19 10:25:17

打开 DevTools 并按 F1 访问设置。查找控制台部分并选中“Log XMLHttpRequests”复选框。

现在您的所有 ajax 和其他类似请求都将记录在控制台中。

我更喜欢这种方法,因为它通常允许我在控制台中查看我要查找的所有内容,而无需转到网络选项卡。

Open up your DevTools and press F1 to access the settings. Look for the console section and check the checkbox for "Log XMLHttpRequests".

Now all of your ajax and other similar requests will be logged in the console.

I prefer this method because it usually allows me to see everything that I'm looking for in the console without having to go to the network tab.

慵挽 2024-08-19 10:25:17

您可以使用Fiddler,这是一个很好的免费工具。

You could use Fiddler which is a good free tool.

野鹿林 2024-08-19 10:25:17

感谢所有试图在这篇文章中提供帮助的人

我有 ubuntu 13.10,我的 chrome 版本是 34.0

对于我的情况,

1.open developer tools in chrome(or use right click on your page and then select inspect element)
2.go to "Network" tab
3.find your ajax request in "Name Path" column 
4.click on the specific ajax link

现在可以使用,您应该在您请求的前面看到一个新面板

in this panel select "Response" tab

Thanks all person who try to help in this post

I have ubuntu 13.10 and my chrome version is 34.0

For my situation this works

1.open developer tools in chrome(or use right click on your page and then select inspect element)
2.go to "Network" tab
3.find your ajax request in "Name Path" column 
4.click on the specific ajax link

now you should see a new Panel in front of you request

in this panel select "Response" tab
油焖大侠 2024-08-19 10:25:17

Phil的第5步中,“资源”在新版本的Chrome中不再可用。您需要单击底部窗格中列出的 Ajax 页面旁边的页面图标,其中包含名称、方法、状态……列,

然后它将显示更多面板,您可以在其中找到错误消息。

In the step 5 of Phil, "Resources" is no longer available in the new version of the Chrome. You need to click the page icon just beside the Ajax page listed in the bottom pane with the columns of Name, Method, Status, ...

Then it will show you more panels where you will find the error messages.

我做我的改变 2024-08-19 10:25:17

您还可以在浏览器中右键单击该页面并选择“检查元素”以打开开发人员工具。

https://developer.chrome.com/devtools

You can also just right click on the page in the browser and select "Inspect Element" to bring up the developer tools.

https://developer.chrome.com/devtools

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文