How to get firebug to break on exception?

Viewed 10711

I'm using Firebug 1.5.4. When I reference an undefined variable or some such, it breaks right where the problem occurs, and throws me into the debug view where I can see the stack and inspect variables.

However, when I throw my own exception, it just takes me to the console and prints out "uncaught exception: blah". I'd like it to break and let me inspect variables. How can I tell Firebug to do this?

4 Answers

Call Web Developer Debugger (Tools => Web Developer => Debugger or Ctrl + Shift + S), click gear icon and check "Pause on exception":

enter image description here

Or execute debugger; in Web Developer Console!

Official Web Developer Debugger docs: https://developer.mozilla.org/en-US/docs/Tools/Debugger

Related