Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

[Stepping] Can't step over upper in call stack #5596

Closed
Loirooriol opened this issue Mar 2, 2018 · 4 comments
Closed

[Stepping] Can't step over upper in call stack #5596

Loirooriol opened this issue Mar 2, 2018 · 4 comments

Comments

@Loirooriol
Copy link
Contributor

Run this code in the console:

function f() {
  var foo = 123;
  ++foo;
  return foo;
}
function g() {
  debugger;
  var bar = f();
  ++bar;
}
g();
  1. The debugger pauses at debugger; in function g.
  2. Step in. The debugger pauses at var bar = f(); in function g.
  3. Step in. The debugger pauses at var foo = 123; in function f.
  4. In call stack, click function g. The debugger goes back to var bar = f(); in function g.
  5. Step over.

Result: The debugger pauses at ++foo; in function f.
Expected: The debugger pauses at ++bar; in function g.

@claim claim bot added the not-available label Mar 2, 2018
@jasonLaster
Copy link
Contributor

@Loirooriol so just to be clear, you would expect a different behavior stepping behavior based on the selected frame in the call stack?

@Loirooriol
Copy link
Contributor Author

Yes, I think it would be more useful. Not sure if it's what debuggers usually do, though.

@jasonLaster
Copy link
Contributor

Yeah, its certainly something I've thought about as well. It seems like something we could do in the happy case.

One challenge would be if we hit a debugger statement or breakpoint while heading to the selected path, but that might be okay...

@jasonLaster
Copy link
Contributor

I'm moving this to the icebox. We will prioritize it in our next release scheduling meeting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants