A genuine firebug bug

70 views
Skip to first unread message

Kwooda

unread,
Sep 17, 2015, 7:52:50 PM9/17/15
to Firebug
I have run across a genuine Firebug bug that is severely limiting my ability to debug any scripts in a major retail web site that I work on. I cannot create a JSFiddle for the issue, because I do not know how to make it load an external script, but it is very easy to reproduce the problem. Just create the following HTML:

<html>
<head>
<title>Test</title>
<script src="javascript/test.js"></script>
</head>
<body>
</body>
</html>

Then create a script, test.js, in a javascript/ folder:

var myObject = {
   a: 123,
   b: 'Hello world',
   toString: function() {
       return this.b;
   }
};
var api = (function() {
   var
          _x,
    _set = function(x) {
                   _x = x;
        },
     _get = function() {
           return _x;
       }
     ;
      return {
       set: _set,
       get: _get
   };
})();

for (var i=0; i<10; i++) {
 api.set(i);
}

Now load the page and open FireBug - make sure Script tab is selected with the Watch tab open.
Set a breakpoint on the for loop. 
Load the page again.
Single-step through the loop.
*** Firebug will stop at toString!!! ****
Continue to single-step.
Open Stack tab and view the stack - notice toString keeps stacking. Loop never continues.

This makes it impossible to step through the code, and there are numerous toString definitions in my code base, and it doesn't matter what code I am stepping through, if there is a toString definition in my code base, Firebug will stop on it!

Peak retail season is fast approaching, and if we have an issue, we need to be able to troubleshoot it quickly. This means we're limited to using other debuggers in other browsers.

How do I go about getting this fixed?

Sebastian Zartner

unread,
Sep 18, 2015, 12:35:20 PM9/18/15
to Firebug
I can reproduce that issue on my machine. To get it fixed, I suggest you create a bug report here:

https://github.com/firebug/firebug/issues

Note that until that's fixed, you can also use the Firefox built-in debugger (Ctrl+Shift+S or Firefox menu > Developer > Debugger), which doesn't have this problem.

Sebastian

Sebastian Zartner

unread,
Nov 24, 2015, 6:46:17 AM11/24/15
to Firebug
I think this was actually already reported as issue #7740.

Sebastian
Reply all
Reply to author
Forward
0 new messages