简体   繁体   English

跟踪javascript函数流程

[英]tracing javascript function flow

I'm debugging and optimizing a page and have found that the js profiler in firebug is great, the only problem is that I've found the problem, however it's a call from the ajax class in my jQuery file, i'm wondering how I would backtrace it into my code. 我正在调试和优化页面,并且发现firebug中的js探测器很棒,唯一的问题是我发现了问题,但是这是来自我的jQuery文件中的ajax类的调用,我想知道如何我会将它追溯到我的代码中。 I'm super new to debugging/optimizing performance, so I'm sorry if this is an easy answer. 我是调试/优化性能的新手,所以如果这是一个简单的答案,我很抱歉。

thanks, Brodie 谢谢,布罗迪

you can put console.trace() statement into your function code and it will give you the trace of function calls in firebug 你可以将console.trace()语句放入你的函数代码中,它将为你提供firebug中函数调用的跟踪

Reference: 参考:

http://getfirebug.com/wiki/index.php/Console_API http://getfirebug.com/wiki/index.php/Console_API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM