Javascript 如何转到 Chrome 开发者工具中的特定文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14608075/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to go to a specific file in Chrome Developer Tools?
提问by Alpha
I am developing a web application with a heavy front-end approach. By using Dojo and the AMD-way, I currently have testing screens which may easily load over a hundred different javascript files.
我正在使用大量前端方法开发 Web 应用程序。通过使用 Dojo 和 AMD 方式,我目前拥有可以轻松加载一百多个不同 javascript 文件的测试屏幕。
When I want to debug for any specific problem, or verify if I am seeing an old version of a specific file, I find it really hard to find my files in the Sources tab in the Chrome Developer Tools.
当我想调试任何特定问题,或验证我是否看到特定文件的旧版本时,我发现很难在 Chrome 开发人员工具的“源”选项卡中找到我的文件。
Is there any shortcut or action I can make that will let me type the name of a file and will take me to the source of that file?
是否有任何快捷方式或操作可以让我输入文件名并将我带到该文件的源?
回答by CD..
While in the sources tab use CTRL+O(?+Ofor Mac) to search scripts, stylesheets and snippets by filename.
在源选项卡中,使用CTRL+ O(Mac 为?+ O)按文件名搜索脚本、样式表和片段。
(use CTRL+SHIFT+Oto filter/navigate to a JavaScript function/CSS rule when viewing a file)
(使用CTRL+ SHIFT+O至滤波器/查看文件时,则定位到一个JavaScript功能/ CSS规则)
回答by Aleksei Mialkin
回答by live-love
In Windows:
在 Windows 中:
Use CTRL+SHIFT+Fto search for content in files.
使用CTRL+ SHIFT+F来搜索文件中的内容。
Use CTRL+SHIFT+Oto search for file names.
使用CTRL+ SHIFT+O搜索文件名。
回答by Hymanie
Mac: Command + O Windows: Ctrl + O
Mac:Command + O Windows:Ctrl + O


