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/bcdf6aa4-3b00-4e18-be10-1a9d2e28e65c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.