1

I'm trying to debug an application and am struggling to display my thrown errors in Firebug.

if I have something like this:

if (!jQuery.fn.drag){
  console.log("found an error");
  throw new Error("file xyz has not loaded");
}

Question:
Why is it, that the console fires, because there is an error, but my custom throw does not report anything in Firebug?

Thanks

4

2 回答 2

2

我试过了throw new Error("error message");,它Firefox 和 Chrome 中都可以使用;

用于console.log(Jquery, Jquery.fn, Jquery.fn.drag)调试您的代码。

于 2012-11-26T16:56:43.610 回答
1

问题可能是您不小心激活了 ' Break on all error 'firebug 选项,如果是这种情况,请在此处查看我的答案以解决它。

于 2012-11-26T16:58:34.677 回答