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.
For more options, visit https://groups.google.com/d/optout.