jQuery Debugging

梦想的初衷 提交于 2019-12-23 05:40:27

问题


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?


回答1:


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.

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




回答2:


This is how the Firebug(debugger) works, The best way to debug this is to set the breakpoint at your code and try to create the scenario which hits this breakpoint first and after that you can continue to the end (skipping the jquery code).



来源:https://stackoverflow.com/questions/9356116/jquery-debugging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!