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

Breakpointing on function doesn't work when the function is called by a kwargs #371

Closed
KristofferC opened this issue Feb 13, 2020 · 0 comments · Fixed by #528
Closed

Breakpointing on function doesn't work when the function is called by a kwargs #371

KristofferC opened this issue Feb 13, 2020 · 0 comments · Fixed by #528
Labels
bug Something isn't working

Comments

@KristofferC
Copy link
Member

KristofferC commented Feb 13, 2020

Found by @fredrikekre

The breakpoint on f below is only hit when called as f() and not as f(;x=1).

julia> using JuliaInterpreter

julia> f(;x=1) = x
f (generic function with 1 method)

julia> breakpoint(f)
f

julia> g() = f(; x=1)
g (generic function with 1 method)

julia> h() = f()
h (generic function with 1 method)

julia> frame = JuliaInterpreter.enter_call(g);

julia> JuliaInterpreter.debug_command(frame, :finish)

julia> frame = JuliaInterpreter.enter_call(h);

julia> JuliaInterpreter.debug_command(frame, :finish)
(Frame for f(; x) in Main at REPL[2]:1
b 1 1  1%1 = (#f#3)(1, #self#)
  2 1  └──      return %1
caller: h() in Main at REPL[5]:1, breakpoint(f(; x) in Main at REPL[2]:1, line 1))

Kwarg wrappers strikes again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant