In the past, I was never able to get a breakpoint to work outside a function no matter what I did. However, I just tried it again (using Mac FF 28 and FB 1.12.8) and it worked fine, and I didn't even have to reload the page. I have no idea what changed. Maybe it depends on what the code line is doing?
BTW... a little off-topic, but I just noticed something else. I can delete the breakpoint from the breakpoints side-panel, but if I right-click on the breakpoint indicator right in the FB code display, I can only disable it, not delete it. Seems like it would be nice to be able to delete it there too, without having to open the side-panel and hunt around for that breakpoint. Lawrence San Business Writing: Santhology.com Cartoon Stories for Thoughtful People: Sanstudio.com On Fri, Jun 6, 2014 at 10:15 PM, Sebastian Zartner < [email protected]> wrote: > If your code is on the global scope, i.e. not within a function, you have > to reload the page to let the script execution stop at the breakpoint. > If that doesn't work, please attach a complete test case > <https://getfirebug.com/wiki/index.php/Creating_a_Test_Case>, so the > problem can be reproduced. > > Sebastian > > > On Friday, June 6, 2014 6:13:08 PM UTC-5, Новак Бошков wrote: >> >> Today is my first day using Firebug and I'm noticed that I can't stop >> debugger on a line outside of function. >> There is following code: >> var oneClassContener = $(".oneClass"); >> [breakpoint]for (var i=0; i<oneClassContener.length; i >> ++){ >> if (oneClassContener[i].tagName === "IMG"){ >> document.write('<img src="' + oneClassContener[i >> ].src.split("/")[oneClassContener[i].src.split("/").length - 1] + >> '"></img>' + "<br />"); >> } else { >> document.write(oneClassContener[i].innerHTML); >> } >> } >> >> And debugger just passes by the breakpoint. Code works but i want to stop >> execution on this line. >> If I surround the code from above with a anonymous function and make a >> call after that, then debugger works like I expect and stops on specified >> line. >> Like this: >> var foo = function(){ >> var oneClassContener = $(".oneClass"); >> [breakpoint]for (var i=0; i<oneClassContener.length; i >> ++){ >> if (oneClassContener[i].tagName === "IMG"){ >> document.write('<img src="' + oneClassContener[i >> ].src.split("/")[oneClassContener[i].src.split("/").length - 1] + >> '"></img>' + "<br />"); >> } else { >> document.write(oneClassContener[i].innerHTML); >> } >> } >> foo(); >> } >> Have I missed some settings or is it a bug? >> If there is reasonable reason for this, what is it? >> Thank you. >> > -- > You received this message because you are subscribed to the Google Groups > "Firebug" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/firebug. > To view this discussion on the web visit > https://groups.google.com/d/msgid/firebug/b3560164-4332-46ad-8b83-89b5926176dc%40googlegroups.com > <https://groups.google.com/d/msgid/firebug/b3560164-4332-46ad-8b83-89b5926176dc%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Firebug" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/firebug. To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/CAMoMLKh9NFm0yT220v0enT0f00C7pQuZj2bmwuJUa294cFvWSw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
