简体   繁体   English

使用链接开源Google Chrome开发者工具来源标签

[英]Use link to open source Google Chrome Developer Tools Sources tab

When running JS unit tests in Google Chrome, occasionally tests fail with a stack trace. 在Google Chrome中运行JS单元测试时,有时候测试会因堆栈跟踪而失败。 The test infrastructure knows the file that failed and possibly the line that caused the failure. 测试基础架构知道失败的文件以及可能导致失败的线路。 I'd like to be able to view the failing .js file in the 'Sources' tab of the Google Closure Developer Tools via a clicking a link. 我希望能够通过点击链接在Google Closure开发者工具的“来源”标签中查看失败的.js文件。

Is it possible to craft a link such that, if the dev tools window is already open that: 是否有可能创建一个链接,如果开发工具窗口已经打开:

  1. the dev tools window gets focus 开发工具窗口获得焦点
  2. Sources tab is selected “源”选项卡已选中
  3. file in question is open 有问题的文件是开放的

The more I think about it, this sounds like maybe a chrome extension would be required? 我想的越多,这听起来可能需要镀铬扩展吗?

I agree you would probably need a plugin. 我同意你可能需要一个插件。 You can however create a view-source link (though no line numbers): 但是,您可以创建一个视图源链接(尽管没有行号):

<a href="view-source:http://stackoverflow.com/questions/18660106">view source</a>

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

相关问题 Chrome 开发者工具源不显示源文件 - Chrome developer tools sources not showing source files Google Chrome开发人员工具的源代码栏中的这些都是什么? - What are all these things under the sources bar of Google Chrome developer tools? 使用$()。load()方法加载脚本。 为什么在Chrome开发者工具的“来源”标签中看不到它? - Loading a script with $().load() method. Why can't I see it in Chrome Developer Tools Sources tab? 打开一个新的Google Chrome标签并获取源 - Open a new Google Chrome tab and get the source 在chrome中打开开发者工具后,Google Maps v3速度非常慢 - Google maps v3 is very slow with developer tools open in chrome 如果 Google chrome 开发人员工具已经打开,如何以编程方式关闭它? - How to programmatically close Google chrome developer tools if it is already open? 从 JavaScript 以编程方式打开 Safari / Google Chrome 开发者工具 - Open Safari / Google Chrome developer tools programmatically from JavaScript Chrome 开发者工具:缺少“元素”选项卡 - Chrome Developer Tools: Missing "Elements" Tab 无法将文件添加到chrome开发人员工具源工作区 - Unable to add files to chrome developer tools sources workspace Chrome开发者工具来源未正确显示javascript文件 - Chrome developer tools sources not showing javascript files correctly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM