Re: firebug 2.0.8 clarification

39 views
Skip to first unread message
Message has been deleted

Sebastian Zartner

unread,
Feb 13, 2015, 3:23:05 AM2/13/15
to fir...@googlegroups.com
This is due to bug 1013219. The debugger currently jumps to the last executable line instead of the closing curly brace (or the <script> tag as in Chrome).

Sebastian

On Tuesday, February 10, 2015 at 2:56:44 PM UTC+1, sa...@iol.it wrote:
Look at this very little piece of html page with script embedded inside:

<!DOCTYPE html>
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div>TODO write content</div>
    </body>
    <script>
        var j = false;
        var t = true;
        if (j && t) {
            window.alert('false');
        }
    </script>
</html>

Obviously the body of the "if" is not executed, so no alert is shown.
However, if I put a breakpoint at the "if" line and then I use "step", the conditional seems satisfied because the arrow appears at the left of "window.alert" line (but continuing, no alert is shown, as expected).
Moreover, if I set a breakpoint in "window.alert" line, the breakpoint is fired!
Look at the attached picture.
Is it normal?

sa...@iol.it

unread,
Feb 13, 2015, 3:36:19 AM2/13/15
to fir...@googlegroups.com
If I understand well, to patch it, I have simply to add dummy code after the last conditional loop, if this is at the end of the script ?
Like:
        if (j && t) {
            window.alert('false');
        } 
        var dummy = 12;

 

Sebastian Zartner

unread,
Feb 13, 2015, 4:06:11 AM2/13/15
to fir...@googlegroups.com
On Friday, February 13, 2015 at 9:36:19 AM UTC+1, sa...@iol.it wrote:
If I understand well, to patch it, I have simply to add dummy code after the last conditional loop, if this is at the end of the script ?

Right. Or at the end of a function. Or just be aware of that now and wait for the bug to be fixed (which will hopefully happen soon as it is already worked on).

Sebastian

Reply all
Reply to author
Forward
0 new messages