On Windows 10 with Juno 1.40.0 (I think, downloaded via Julia Pro 1.2), I’m trying to use the Juno debugger via Juno.@enter, but I am unable to evaluate the parameters of my function, unlike in the example. The documentation suggests I should be able to do that.
Here’s the function in a .jl file. I use C-<enter> to evaluate the function at the repl.
function f(x, y, z)
println(x)
println(y)
println(z)
end
I then run Juno.@enter, and the debugger appears to start without trouble, but I get an error when I try to inspect the value of x:
Starting Julia...
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.2.0 (2019-08-20)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> Juno.@enter f(1,2,3)
debug> x
ERROR: ArgumentError: invalid index: Symbol("#self#") of type Symbol
Stacktrace:
[1] to_index(::Symbol) at .\indices.jl:270
[2] to_index(::Array{Int64,1}, ::Symbol) at .\indices.jl:247
[3] to_indices at .\indices.jl:298 [inlined]
[4] to_indices at .\indices.jl:295 [inlined]
[5] getindex at .\abstractarray.jl:981 [inlined]
[6] eval_code(::JuliaInterpreter.Frame, ::String) at C:\Users\carlm\.juliapro\JuliaPro_v1.2.0-1\packages\Atom\Wouyw\src\debugger\stepper.jl:460
[7] interpret at C:\Users\carlm\.juliapro\JuliaPro_v1.2.0-1\packages\Atom\Wouyw\src\debugger\stepper.jl:437 [inlined]
[8] interpret at C:\Users\carlm\.juliapro\JuliaPro_v1.2.0-1\packages\Atom\Wouyw\src\debugger\stepper.jl:436 [inlined]
[9] (::getfield(Atom.JunoDebugger, Symbol("##56#58")))(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at C:\Users\carlm\.juliapro\JuliaPro_v1.2.0-1\packages\Atom\Wouyw\src\debugger\stepper.jl:226
[10] #invokelatest#1 at .\essentials.jl:790 [inlined]
[11] invokelatest at .\essentials.jl:789 [inlined]
[12] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\LineEdit.jl:2306
[13] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\LineEdit.jl:2300
[14] debugprompt() at C:\Users\carlm\.juliapro\JuliaPro_v1.2.0-1\packages\Atom\Wouyw\src\debugger\stepper.jl:242
[15] (::getfield(Atom.JunoDebugger, Symbol("##52#54")))() at .\task.jl:268
Not sure what’s wrong with my setup. Any idea of where to look?
I think you can only find that in the installer’s file name. Just checked with the latest binary for Windows (JuliaPro-1.2.0-1_build-236), and everything seems to be working fine.
I didn’t try it with Julia Pro, but I setup Julia 1.3 with Juno and it’s all working. Best I can guess is that I broke my JuliaPro installation somehow.
In particular I sometimes get stuck installing a package because my internet is slow and sometimes if I cancel in the middle things don’t revert correctly.
The new debugger looks pretty cool, so I’m looking forward to using it.