Re: latest firebug debugger is totally random in action

65 views
Skip to first unread message

Jim Michaels

unread,
Jun 25, 2012, 2:48:00 AM6/25/12
to fir...@googlegroups.com

On Saturday, June 23, 2012 9:32:02 PM UTC-7, Jim Michaels wrote:
the debugger is now useless.  it used to be useful and I could debug my code with it.  not anymore. when I "step into", it now jumps to random places in the code. in one particular piece of code, I have no events or anything interrupting, purely procedural.  the code is
<hr>
<h2 style="border-style:dashed; border-width:thin; border-color:#0f0;" placeholder="Results title goes here">Results: <span id="js-collect-h">&nbsp;</span></h2>
<p id="js-collect-out" style="border-style:dashed; border-width:thin; border-color:#0f0;" placeholder="Results go here">&nbsp;</p>
<script type="text/javascript">
function collect(idBase, title) {
    var i,s="";
    for (i = 1; document.getElementById(idBase + i); i++) {
        s += document.getElementById(idBase + i).innerHTML;
    }
    document.getElementById('js-collect-h').innerHTML = title;
    document.getElementById('js-collect-out').innerHTML = s;
}
</script>
and this goes throughout the document collecting content from id+numbered elements, concatenates it together, and stuffs it into a results box - sort of like search results.


more detail: 1.9.2 in ff 13 or 14 seems to (currently) want to skip over the last 2 lines of the function. these:
    document.getElementById('js-collect-h').innerHTML = title;
    document.getElementById('js-collect-out').innerHTML = s;

where the function modifies the HTML dynamically above it.
right after the last step-in with
s += document.getElementById(idBase + i).innerHTML;
I see I am right back to the function prototype, rather than at any of the lines mentioned above (where I *should* be).
it appears that if the document structure has been modified, it causes firebug to go nuts.


Sebastian Zartner

unread,
Jun 25, 2012, 8:32:40 AM6/25/12
to fir...@googlegroups.com
I can't reproduce this with the simple test case file based on your code. I set a breakpoint at line 18 (var i,s="";) and when the debugger stops I click Step Into until the loop has finished and I land at line 22 (document.getElementById('js-collect-h').innerHTML = title;).
Could you please provide a complete test case for this, so I can reproduce what you see?

You can also try out Firebug 1.10b1 and see if the problem is gone.

Sebastian
debuggerMissingLines.html

Jim Michaels

unread,
Jun 26, 2012, 3:24:18 AM6/26/12
to fir...@googlegroups.com

Jim Michaels

unread,
Jun 26, 2012, 7:49:28 AM6/26/12
to fir...@googlegroups.com
it doesn't behave consistently with 1.10.  it steps all the way ythrough now, but sometimes it ends by showing me the function prototype with the buttons grayed out, and sometimes it just sits there showing me the code with the buttons grayed out.

On Tuesday, June 26, 2012 12:24:18 AM UTC-7, Jim Michaels wrote:
http://jesusnjim.com/common/collect.html

Sebastian Zartner

unread,
Jun 26, 2012, 8:32:08 AM6/26/12
to fir...@googlegroups.com
Please post your answers to issue 5616 to avoid having to read through both to be able to follow this conversation. Thanks.

Sebastian
Reply all
Reply to author
Forward
0 new messages