How to get access to the list of files of the network tab in chrome devtools?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 18:09:01

问题


I want to create a snippet of code that display the list of all files loaded and shown in the network tab of chrome devtools.

Load a page in chrome, press CTRL+SHIFT+I, click network tab, press CTRL+SHIFT+I again to debug the debugger. There's an array called _nodesByRequestId in network_module.js. You can put some breakpoints, refresh the first page so code will halt on them, and then type this._nodesByRequestId to see its content. It works because the debugger is halted in local scope.

How can I check if there is a way to display this array in console without using breakpoint ? Some kind of path to the var from global scope (sub object of window object or static WebInspector class or anything).

For info, here is a snippet that display the list of url

for (var [key, val] of this._nodesByRequestId) {
     console.log(val._request._url);
}

来源:https://stackoverflow.com/questions/39392729/how-to-get-access-to-the-list-of-files-of-the-network-tab-in-chrome-devtools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!