Closed Bug 1476667 Opened Last year Closed 9 months ago

Step over should not take two steps to leave a function which has a return

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlast, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently step over stops twice at the end of functions with a return value. This is because the first pause is the onStep and the second is the onPop. We want to prevent the first one because it doesn't show the completion value and is redundant.


> function f() {
>   return 2;
> }  // <--- pauses twice here


This PR fixes that, but we should also in the engine so we do not need an empty point. https://github.com/devtools-html/debugger.html/pull/6660
Blocks: js-devtools
Priority: -- → P3
Here's an example where this behavior of jumping to the end causes unintuitive stepping behavior.
Blocks: dbg-stepping

I believe this is fixed.

Flags: needinfo?(lsmyth)
Blocks: dbg-control
No longer blocks: dbg-stepping

Yeah, now that https://bugzilla.mozilla.org/show_bug.cgi?id=breakpoint-specificity limits the stepping locations, this weird bytecode position metadata isn't an issue for us.

Status: NEW → RESOLVED
Closed: 9 months ago
Flags: needinfo?(lsmyth)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.