Google Chrome:如何随机调试“超出最大调用堆栈大小”错误 [英] Google Chrome: How to debug random "Maximum call stack size exceeded" errors
问题描述
未捕获的RangeError:超过最大调用堆栈大小
Class.proto
Class.proto
...
...有几页 Class.proto
堆栈跟踪行,但没有源/行信息无论如何,即使在踪迹的底部。
我知道这指向无限递归,这可能发生在事件系统中,但没有明显的起始点击我。
我只能在Chrome Canary (22.0.1209.0)中重新生成,而不是Chrome稳定版或Firefox。该应用程序不会与任何外部服务通话或发出任何Ajax请求。
由于它偶尔发生,并且没有明显的原因,并且因为没有可用的堆栈跟踪,我无法追查原因。
我的问题:我能做些什么来调试这个问题?
在Chrome开发人员工具栏中启用打破例外功能。使用来源选项卡上工具栏页脚中的图标>>图标(有3个州!)
它应该停止你的代码,你可以看到堆栈!
In a complex JavaScript app (with jQuery and Ember), the JavaScript will occasionally crash randomly, either during page load or when I perform an action on the page. The error is as follows (screenshot):
Uncaught RangeError: Maximum call stack size exceeded
Class.proto
Class.proto
...
... with several pages of Class.proto
stack trace lines, but no source/line information whatsoever, even at the bottom of the trace.
I know that this points at infinite recursion, and this could conceivably happen in the event system, but there is no obvious starting point for me.
I've been able to reproduce this only in Chrome Canary (22.0.1209.0), not Chrome stable or Firefox. The app is not talking to any external service or making any Ajax requests.
Since it happens only occasionally, and with no discernible cause, and since there's no usable stack trace, I'm having trouble tracking down the cause.
My question: What can I do to debug this problem?
Enable 'Break on exceptions' in the Chrome Developer Toolbar. Use this icon in the footer of the toolbar on the Sources tab (there are 3 states!)
It should stop your code and you can see the stack!
这篇关于Google Chrome:如何随机调试“超出最大调用堆栈大小”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!