Skip to content

Step-next should also stop if the function scope is exited #7

@alt-romes

Description

@alt-romes

Currently, step-next means we stop at every breakpoint within the same function.

However, if we first (1) step-into a function and then (2) step-next until that function returns, it is potentially more useful and natural if the debugger stopped at the next breakpoint in the function from which we initiated the step-in, rather than resuming execution until the program terminates.

Example

f = do
  a
  b <--- break here
  c

b = do
  d
  e

...

Consider we are stopped at b and we step-into b.
Inside of b, if we step-next twice we will go over d, then e, and then exit b. Since we're stepping to the next breakpoint in b, but none is ever hit, execution resumes until the program terminates.

In practice, wouldn't it be more useful if after returning from b we were stopped at c, right after we had stepped in?

Or maybe the user has to be wary of this and use step out (#6) appropriately?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions