debugger icon indicating copy to clipboard operation
debugger copied to clipboard

[Stepping] Upon stepping onto certain statements, the editor realigns vertically to the leftmost frame of the editor.

Open mmcote opened this issue 8 years ago • 2 comments

When we refactored scrolling last month, we removed a check that used to ensure that we'd only scroll if the line were not visible. We should bring that back because now it's very jump 🏃

STR:

  • Go to a webpage with heavily nested statements, such as the file given below.
  • Add a breakpoint to the first if statement.
  • Shrink the horizontal scroll view to as small as possible, ensuring some of the statements are out of sight.
  • Step through the code to the most nested element and note how the code realigns vertically to the debugger statements, but realigns to the leftmost frame of the editor when debugging if statements.
<html>
  <head>
    <title>Debugger Statements</title>
  </head>

  <body>
    <script>
      test();

    function test() {
        if (1 + 1 == 2)
        {
            debugger;
            if (2 + 2 == 4)
            {
                debugger;
                if (3 + 3 == 6) 
                {
                    debugger;
                    if (4 + 4 == 8) 
                    {
                        debugger;
                        if (1 + 1 == 2) 
                        {
                            debugger;
                            if (2 + 2 == 4) 
                            {
                                debugger;
                                if (3 + 3 == 6) 
                                {
                                    if (4 + 4 == 8) 
                                    {
                                        debugger;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    </script>
  </body>

</html>

skippingbackandforth


mmcote avatar Jan 24 '18 02:01 mmcote

/claim

mmcote avatar Jan 24 '18 02:01 mmcote

Thanks for claiming the issue! :wave:

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Jan 24 '18 02:01 claim