使用firebug打印整个程序的功能日志/堆栈跟踪 [英] Print function log /stack trace for entire program using firebug

查看:113
本文介绍了使用firebug打印整个程序的功能日志/堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Firebug能够记录对特定功能名称的调用。我正在寻找一个有时会阻止页面呈现的错误,但不会导致任何错误或警告。这个bug只出现了大约一半的时间。那么如何获得整个程序的所有函数调用列表,或者执行整个程序的某种堆栈跟踪?

Firebug has the ability to log calls to a particular function name. I'm looking for a bug that sometimes stops a page from rendering, but doesn't cause any errors or warnings. The bug only appears about half the time. So how do I get a list of all the function calls for the entire program, or some kind of stack trace for the execution of the entire program?

推荐答案

Firefox提供 console.trace() ,打印调用堆栈非常方便。它也可以在 Chrome IE 11

或者尝试这样的事情:

function print_call_stack() {
  var stack = new Error().stack;
  console.log("PRINTING CALL STACK");
  console.log( stack );
}

这篇关于使用firebug打印整个程序的功能日志/堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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