简体   繁体   English

Chrome浏览器开发者工具:脚本多次显示

[英]Chrome Browser Developer Tools: Scripts Show Up Multiple Times

When using Chrome's Developer Tools to debug Javascript, the list of 'Scripts' tends to add multiple occurrences of each script as I'm changing/reload/testing the code. 当使用Chrome的开发人员工具来调试Javascript时,“脚本”列表往往会在我更改/重新加载/测试代码时添加每个脚本的多次出现。 Safari uses the same essential tool set and does not do this. Safari使用相同的基本工具集,但不执行此操作。 It's not unknown for a script to show up in this list 10 times. 脚本在此列表中出现10次并不是未知数。 When this happens, the only thing I can think to do is to kill the tab and reload it. 当发生这种情况时,我唯一能想到的就是杀死标签并重新加载。 Is this a known bug? 这是一个已知的错误?

Chrome version 18.0.1025.168 (up to date as of this writing) Chrome版本18.0.1025.168(截至本文撰写时为最新版本)

Mac OSX version 10.7.3 (Lion) Mac OSX版本10.7.3(Lion)

Cheers! 干杯!

Mark 标记

I think you are using Chrome extensions. 我认为您使用的是Chrome扩展程序。 Some extensions will cause this issue, check by disable some of them. 某些扩展会导致此问题,请通过禁用其中一些来检查。

Yes, this could be a bug. 是的,这可能是一个错误。 See: 看到:

https://code.google.com/p/chromium/issues/detail?id=113490 https://code.google.com/p/chromium/issues/detail?id=113490

You could try seeing if there are several frames that are using the same script and test the frames one at a time... 您可以尝试查看是否有多个帧使用相同的脚本并一次测试一个帧...

Double-check that the scripts are not being called in your source multiple times. 仔细检查您的源中未多次调用脚本。 It's been my experience that I include js files multiple times on accident and didn't realize it until inspecting the final source HTML in Chrome's Developer Tools. 根据我的经验,我在事故中多次包含js文件,直到在Chrome的开发者工具中检查最终源HTML时才意识到这一点。

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

相关问题 在Chrome的开发人员工具控制台中静音脚本 - Mute scripts in Chrome's developer tools console 如何使用Chrome浏览器开发者工具调试网页上的脚本? - How can I debug the scripts on my web page using the Chrome browser developer tools? 为什么带有Sourcemap的javascript在Chrome Developer Tools中没有显示为.ts文件? - Why does a javascript with sourcemap not show up as a .ts file in Chrome Developer Tools? 隐藏chrome-extension:在“开发人员工具”脚本选项卡中 - Hide chrome-extension: in “Developer Tools” Scripts tab 浏览器开发者工具:禁用第 3 方脚本中的警告 - Browser Developer Tools: Disable Warnings in 3rd Party Scripts Chrome开发人员工具:有没有办法显示调用该函数的方式? - Chrome developer tools: is there a way to show what calls the function? jQuery.getScript可以将该文件显示为Chrome Developer Tools中的资源吗? - Can jQuery.getScript show the file as a resource in Chrome Developer Tools? 为什么 Chrome 开发者工具显示 function is not defined? - Why does Chrome developer tools show function is not defined? Chrome 开发者工具显示不存在的 js 文件? - Chrome developer tools show js file that does not exists? 为什么Chrome Developer Tools不显示所有JavaScript文件? - Why doesn't Chrome Developer Tools show all JavaScript files?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM