Closed Bug 1327676 Opened 7 years ago Closed 5 years ago

"Step out" isn't equal to "step in" in the end of function (return value; need 1 pressing vs 2 pressings)

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url [1]
2. Set breaking on 'click' event
3. Click on the page
4. Click "Step in" to step in function F
5. Press "Step in" several times until you step out of function F

AR:  Line "  var a = F();" is focused


STR_2:
1. Open url [1]
2. Set breaking on 'click' event
3. Click on the page
4. Click "Step in" to step in function F
5. Press "Step out" several times until you step out of function F

AR:  Line "  return a;" is focused

ER: They should work equally, developer shouldn't think about such tricks while debugging (should he?)

> [1] data:text/html,<script src="data:text/javascript,function F(){%250A  return Math.abs(-0.5*Date.now())%250A}"></script><script src="data:text/javascript,onclick=function(){%250A  var a = F();%250A  return a;%250A}"></script>
No longer blocks: 1277113
Component: Untriaged → Developer Tools: Canvas Debugger
Component: Developer Tools: Canvas Debugger → Developer Tools: Debugger
Thanks arni, this is a nice find and I agree that we should be consistent with how we handle returning from a function while stepping. I checked with chrome and they always step to the next line, which seems like a good behavior. This might be related to how we handle stepping with variable declarations like `var a = 2, b = 3`. 

Firefox
http://g.recordit.co/JtaVsWuI3L.gif

Chrome
http://g.recordit.co/Hdjb3BQ3OC.gif
Priority: -- → P3
Product: Firefox → DevTools

This should now be fixed

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.