jQuery调试 [英] jQuery Debugging

查看:112
本文介绍了jQuery调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何防止调试器(在这种情况下为Firebug或PhpStorm)从jQuery和其插件源代码中步入一步,只是跨越我们自己的代码?

How prevent a debugger (Firebug or PhpStorm in this case) from step in jQuery and its plugins source code and just step over our own code?

推荐答案

JavaScript调试器无法确定代码与其他人的代码之间的区别。你最好的选择是在&在你想要跳过的代码块之后(比如一个jQuery选择器),所以你可以使用调试器Continue功能来跳过这个外部代码。

JavaScript debuggers have no way to determine the difference between your code and someone else's code. You're best option is to either set breakpoints before & after the blocks of code you want to skip (say a jQuery selector) so you can use the debuggers Continue feature to skip that external code.

或者你可以使用<一个href =https://developer.mozilla.org/en/JavaScript/Reference/Statements/debugger =noreferrer> 调试器 声明以编程方式停止代码中的积分。

Alternatively you can use the debugger statement to programmatically stop at points in the code.

这篇关于jQuery调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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