如何在JavaScript(或ecmascript)中中断运行时异常(或错误)? [英] How can I get break on runtime exception(or error) in javascript (or ecmascript?)
本文介绍了如何在JavaScript(或ecmascript)中中断运行时异常(或错误)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何避免出错?
我有一个代码:
throw new Error("Some error");
我正在使用最新版本的Web Inspector(Webkit)和Firebug(Mozilla)。这些工具可以捕获并打印错误,但不会损坏。我可能不知道该怎么做。请让我知道我该怎么做?
And I'm using most recent version of Web Inspector (Webkit) and Firebug(Mozilla). These tools catch and print the error, but does not break. May I don't know the how to. Please let me know how can I to do these?
推荐答案
在WebKit中,您需要单击此按钮以启用错误中断。如果再次单击它,它还会中断警告,再次单击它会禁用它。
In WebKit you need to click this to enable break on error. If you click it again it will also break on warnings and clicking it again will disable it.
替代文字http://a.yfrog.com/img832/3580/screenshot20100723at101.png
这篇关于如何在JavaScript(或ecmascript)中中断运行时异常(或错误)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文