oxinabox / MagneticReadHead.jl

A cassette-based debugger | The Other Debugger
MIT License
50 stars 6 forks source link

Sometimes StepNext will step you into the debuggers source #42

Open oxinabox opened 5 years ago

oxinabox commented 5 years ago

I am pretty sure this is to do with StepNext becoming StepOut if there are no more statements here. But even so StepOut should not do this either.

julia> function f(x)
                  return x
              end
f (generic function with 1 method)

julia> @iron_debug f(2)
2

julia> set_breakpoint!(f)
1-element Array{MagneticReadHead.Rule,1}:
^[[A MagneticReadHead.Rule{typeof(f)}(f, 0)

julia> @iron_debug f(2)

Breakpoint Hit: f(x) in Main at REPL[2]:2
➧function f(x)
            return x
        end

Vars: x
Commands: CC (Continue), SI (Step In), SN (Step Next), SO (Step Out), XX (Abort)
iron>SN

Breakpoint Hit: (::getfield(Main, Symbol("##9#10")))() in Main at /Users/oxinabox/JuliaEnvs/MagneticReadHead/src/MagneticReadHead.jl:33
         ctx = HandEvalCtx($(__module__), StepContinue())
         try
➧            return Cassette.recurse(ctx, ()->$(esc(body)))
         catch err
             err isa UserAbortedException || rethrow()

Vars:
Commands: CC (Continue), SI (Step In), SN (Step Next), SO (Step Out), XX (Abort)
iron>SN
2