JuliaDebug / Debugger.jl

Julia debugger
MIT License
465 stars 41 forks source link

Breakpoint always hits in `open_flags` in `IOBuffer()` when setting a breakpoint elsewhere #351

Open fredrikekre opened 2 days ago

fredrikekre commented 2 days ago
julia> using Debugger

julia> function g()
           io = IOBuffer()
           return io
       end
g (generic function with 1 method)

julia> function f()
           x = g()
           println(x, "hello")
       end
f (generic function with 1 method)

julia> @enter f()
In f() at REPL[3]:1
 1  function f()
>2      x = g()
 3      println(x, "hello")
 4  end

About to run: (g)()
1|debug> bp add println
[ Info: added breakpoint for function println
1] println

1|debug> c
Hit breakpoint:                                                    # <----------- ??
In open_flags(, ) at io.jl:345
>345  function open_flags(;
 346      read     :: Union{Bool,Nothing} = nothing,
 347      write    :: Union{Bool,Nothing} = nothing,
 348      create   :: Union{Bool,Nothing} = nothing,
 349      truncate :: Union{Bool,Nothing} = nothing,

About to run: Core.NewvarNode(:(_4))
KristofferC commented 2 days ago

JuliaInterpreter issue, the breakpoints are busted since the change to kwcall.