调试时如何忽略某些脚本文件/线? [英] How to ignore certain script files / lines when debugging?
问题描述
<但我的问题是,其他代码(代码,鼠标移动侦听器等)立即被捕获。
我想做的是告诉调试器忽略某些JavaScript文件或单独的行,以便它不会停止代码我不感兴趣或被排除。有没有办法在IE( spit,spit!)中实现?或者你可以建议一个更好的方法?
在FireFox中,此功能称为黑拳击,并且将与FireFox 25一起提供。它让我们完全按照你要查找的内容。
也引入到Chrome(v30 +),尽管它更难找到/配置。这被称为跳过具有特定名称的源和Collin Miller 在描述如何配置它方面做得非常出色
通常我将这些答案放在这里而不是链接但是我最终会复制Collin的帖子。
I'm trying to debug some JavaScript, I want to find out what code gets executed when I hover over a certain div element (I've got no idea which bit of code, because there's no direct 'onmouseover' - I think there's a jQuery selector in place somewhere?).
Usually I'd use the "Break All" / "Break On Next" facility provided by Developer Tools / Firebug, but my problem is that other code (tickers, mouse movement listeners etc.) immediately gets caught instead.
What I'd like to do is tell the debugger to ignore certain JavaScript files or individual lines, so that it won't stop on code I'm not interested in or have ruled out. Is there any way to achieve that in IE (spit, spit!) - or could you suggest a better approach?
In FireFox this feature is called "Black boxing" and will be available with FireFox 25. It let's do exactly what you where looking for.
This feature was also introduced to Chrome (v30+) although it's tougher to find/configure. It's called "skip through sources with particular names" and Collin Miller did an excellent job in describing how to configure it.
Normally I'm for putting answers and howtos here instead of links but it would just end in me copying Collin's post.
这篇关于调试时如何忽略某些脚本文件/线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!