Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepping and macros #636

Open
timholy opened this issue Jul 18, 2024 · 0 comments
Open

Stepping and macros #636

timholy opened this issue Jul 18, 2024 · 0 comments

Comments

@timholy
Copy link
Member

timholy commented Jul 18, 2024

On Julia 1.12 (with the new linetable implementation), a stepping test fails at

f, pc = debug_command(f, :n) # x is set
because it ends up "prematurely" at the final return statement. Specifically, rather than just setting x, it executes the entire macro
macro insert_some_calls()
esc(quote
x = sin(b)
y = asin(x)
z = sin(y)
end)
end

In other words, in Julia 1.12, "step-next" steps "over" the macro. There are some things I like about this behavior (it matches what the developer sees when looking at the code that calls the macro).

You might imagine that "step-in" would step into the macro, but that's not currently true: it steps into the implementation of sin. So it's definitely inconsistent. We could either make it behave the same as previous versions, or decide we like the idea of stepping into the macro and figure out how to get that working properly (it would be a breaking change).

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

No branches or pull requests

1 participant