作者:louning5257_364 | 来源:互联网 | 2023-05-18 17:14
ImlookingforawaytodebugadynamicallyloadedjQuerydocument.readyfunction.我正在寻找一种方法来调试动态加
I'm looking for a way to debug a dynamically loaded jQuery document.ready function.
我正在寻找一种方法来调试动态加载的jQuery document.ready函数。
Obviously I can't just bring up the script panel and add a breakpoint with the mouse since the function does not exist there.
显然我不能只调出脚本面板并用鼠标添加断点,因为那里没有该函数。
I've also tried adding "debugger;" to the function (without the quotes), but that did not do anything. I have ensured that the function is actually executed while I tried this.
我也试过添加“调试器”;到函数(没有引号),但没有做任何事情。我已经确保在我尝试这个时实际执行了该功能。
Thanks for your help,
谢谢你的帮助,
Adrian
阿德里安
Edit: I just noticed that Firebug actually breaks on debug. However, when it does so on a dynamically loaded script, it does not bring up the source code of that script as usual. Plus, the call stack ends right below my own code. I can bring up the implementation for document.ready via the call stack, but that does not really help. Is this a Firebug bug or have I missed something?
编辑:我刚注意到Firebug实际上在调试中断了。但是,当它在动态加载的脚本上执行此操作时,它不像往常那样显示该脚本的源代码。另外,调用堆栈在我自己的代码下面结束。我可以通过调用堆栈调出document.ready的实现,但这并没有真正帮助。这是一个Firebug错误还是我错过了什么?
5 个解决方案