调试时如何忽略某些脚本文件/线? [英] How to ignore certain script files / lines when debugging?

查看:132
本文介绍了调试时如何忽略某些脚本文件/线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图调试一些JavaScript,我想知道当我将鼠标悬停在某个div元素上时,执行什么代码(我不知道哪一段代码,因为没有直接的'onmouseover' - 我通常我会使用开发工具/ Firebug提供的全部休息/休息下一个工具,这样一来,某个地方有一个jQuery选择器就位于某个地方?)



<但我的问题是,其他代码(代码,鼠标移动侦听器等)立即被捕获。



我想做的是告诉调试器忽略某些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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆