Firebug not breaking on errors
I reinstalled Firefox today, because... whatever.
I reinstalled firebug, therefully, and now when I try to use it, it's all different. I believe it is the same version I had before. In fact, I even went digging through my trash and replaced the new firebug with the one I removed with the old Firefox. They ended up being the same version (1.5.3).
My issue is, when I have an error in my script somewhere, it used to be that if on the script pane of firebug, the script would break on the error, and the script page would go to the offending line, highlighted, and all was right with the world.
Now it logs the error in the console, and that's it. I've spent the better part of the last hour trying to convince myself this isn't worth an ulcer; I am losing the battle, though.
I've searched G开发者_JS百科oogle, put ads on Craigslist, even thought about becoming a cop. There were some examples on the Firebug dox, but none of them helped. A bunch of old references to a mysterious (break on all errors) option; an option which I think I might have set by accident--there is a little red circle-slash on my pause button (that's what she said), but there the script continues, all on its own.
There was a guide somewhere on the firebug pages that spoke of setting the breakpoint next to the error in the console. I don't have this option for some reason. The line of code is there in the console, but there is no breakpoint button next to it. However, this would not be ideal even if it worked. I liked it when I could have the script page open and if there were errors it would jump to that line. I could then try to fix it and re-load the page. If that line was fixed, GREAT, on to the next error on the page -- which would be highlighted and ready.
I would like to offer a solicitation of help.
Help.
Someone indicated that I should have the pause button clicked in order to get the program to pause on errors. I am a bit confused about this: the pause button has a little 'play' icon on it. If I click it, the button animates as if glowing. But, upon reloading the page, it breaks on the first line of one of the .js files (which is a comment) but does not break on a js error I deliberately put in there (unclosed function).
Upon playing a little further, I guess my problem was that the error I had inserted was in the middle of a page, and not in the middle of a .js file :/ If I put an error in a .js file, it works as I love it to.
Thanks everybody
In console tab toggle the "pause" button - it will make firebug break on javascript errors.
In recent versions it started to not break on errors by default.
You can also click on circle next to the green line of source code to enable or disable special breakpoint which is triggered only if the error occurs while executing that line.
the pause button under the console tab does cause it to break on and jump to the specific error - e.g. an undefined function - however if you just enter some garbage in your js file e.g. "fsdfsdfjsdkhfjksd" - then it does not jump to the error but will list the error under the console tab > errors sub tab ...
edit .. strangely if you enter the garbage e.g. "def fsdfsdfsdfsdfsd" then it doesn't work but if you enter the garbage - "fsdfsdfjsdkhfjksd" - it does work! - weirdness! computers!
(ps no quotes around the garbage enterered plz!)
精彩评论