简体   繁体   中英

why is my javascript throw not working in Firebug?

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

I tried throw new Error("error message"); and it´s working in both Firefox and Chrome;

Use console.log(Jquery, Jquery.fn, Jquery.fn.drag) to debug your code.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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