Debugging constructors

I’m trying to use the debugger in Juno, and it fails with an UndefRefError if I set a breakpoint inside a constructor. Does anyone have any idea why this is happening or what I can do about it? Here’s a minimal example:

struct A
    a::Int
end

function A()
    a = 2
    A(a)
end

function B()
    a = 2
    A(a)
end

println(A().a)
println(B().a)

If I run without the debugger, it correctly prints 2 twice. When I set a breakpoint on line 12 (the last statement in function B), the debugger behaves correctly and I can inspect local variables. When I set a breakpoint on line 7 (the last statement in function A), the debugger errors and won’t let me inspect anything (neither in the workspace nor the REPL). Here’s the full text of the error:

Julia Client – Internal Error

UndefRefError: access to undefined reference
locals(::JuliaInterpreter.Frame) at utils.jl:428
localvars(::JuliaInterpreter.Frame) at workspace.jl:22
contexts(::Atom.JunoDebugger.DebuggerState) at workspace.jl:13
contexts at workspace.jl:5 [inlined]
workspace(::String) at workspace.jl:9
handlemsg(::Dict{String,Any}, ::String) at comm.jl:169
(::Atom.var"#31#33"{Array{Any,1}})() at task.jl:358

Thanks for the report! Should be fixed by