RESOLVED INVALID Bug 74107
Web Inspector: [protocol] Debugger.setScriptSource response should include "stepInRecommended" field
https://bugs.webkit.org/show_bug.cgi?id=74107
Summary Web Inspector: [protocol] Debugger.setScriptSource response should include "s...
Peter Rybin
Reported 2011-12-08 11:14:41 PST
This field tells frontend that performing "step in" will make application state more consistent. This is important for user experience.
Attachments
Timothy Hatcher
Comment 1 2011-12-08 14:04:03 PST
Can you provide more information about this?
Peter Rybin
Comment 2 2012-04-23 10:25:54 PDT
Steps to demonstrate. 1. In JavaScript debugger stop in any multi-line multi-statement function. For example at site http://www.artlebedev.ru/ in script "colors.js" put a breakpoint in function "hsv2rgb" at any statement but last, debugger will stop there promptly. 2. Note the stack structure. For example: -> hsv2rgb - SetLogoColor - SlightlyAlterColor 3. Modify body of the function you stopped in (in this example "hsv2rgb") and press Ctrl+S. 4. Top function gets dropped from the stack. Cursor is now at the previous function (in this example "SetLogoColor"). 5. Try "Step over" debugger action. Expected: Cursor moved to the next statement within the current function ("SetLogoColor") or leaves it if it was the last statement. Actual: Execution jumps inside original function ("hsv2rgb") as if user pressed "Step in" instead of "Step over".
Peter Rybin
Comment 3 2012-04-23 10:29:16 PDT
This happens because after liveedit operation V8 remains in slightly inconsistent state, when the top function is not visible on stack, but from the "step over" point of view, we are at the pre-beginning of the top function. That's why it's recommended for the front-end to issue additional "step in" command. It's hard for V8 to do it itself for the technical reasons.
Note You need to log in before you can comment on or make changes to this bug.