New Julia debugger in Juno

Anybody noticed this?

I was very excited, but after updating / adding all packages they mentioned in the article, I still cannot make GUI debugger in Juno work.

I tried both Julia 1.0.3 and 1.1.0 (both standard version, not JuliaPro). Some packages mentioned cannot be updated in Julia 1.0.3. But whatever I do, Juno.@run wouldn’t work.

julia> Juno.@run main()
ERROR: LoadError: UndefVarError: @run not defined
in expression starting at none:1

Can anybody help? Thanks!

1 Like

What version of the Julia packages are you running (try pkg> status in the REPL)? Make sure you’re on Juno.jl 0.7.0 and Atom.jl 0.8.2.

Thanks.

I installed Atom in standalone (1.35.1 x64), then installed Uber Juno, and points it to one of the 2 Julia installations (1.0.3 and 1.1.0).

Using my 1.1.0 as an example, my Juno.jl is at v0.5.4, and my Atom.jl is at v0.7.14. I tried updating them but got this error message:

(v1.1) pkg> update Juno
Updating registry at C:\Users\zpan\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 [e6d88f4b]:
ASTInterpreter2 [e6d88f4b] log:
├─possible versions are: 0.1.0-0.1.1 or uninstalled
├─restricted by julia compatibility requirements to versions: uninstalled
└─restricted by compatibility requirements with Atom [c52e3926] to versions: 0.1.0-0.1.1 — no versions left
└─Atom [c52e3926] log:
├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0-0.4.6, 0.5.0-0.5.10, 0.6.0-0.6.17, 0.7.0-0.7.15, 0.8.0-0.8.2] or uninstalled
└─restricted to versions 0.7.14 by an explicit requirement, leaving only versions 0.7.14

(v1.1) pkg> update Atom
Updating registry at C:\Users\zpan\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 [e6d88f4b]:
ASTInterpreter2 [e6d88f4b] log:
├─possible versions are: 0.1.0-0.1.1 or uninstalled
├─restricted by julia compatibility requirements to versions: uninstalled
└─restricted by compatibility requirements with Atom [c52e3926] to versions: 0.1.0-0.1.1 — no versions left
└─Atom [c52e3926] log:
├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0-0.4.6, 0.5.0-0.5.10, 0.6.0-0.6.17, 0.7.0-0.7.15, 0.8.0-0.8.2] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0-0.4.6, 0.5.0-0.5.10, 0.6.0-0.6.17, 0.7.0-0.7.15, 0.8.0-0.8.2]
├─restricted by julia compatibility requirements to versions: [0.7.0-0.7.15, 0.8.0-0.8.2] or uninstalled, leaving only versions: [0.7.0-0.7.15, 0.8.0-0.8.2]
└─restricted by compatibility requirements with Juno [e5e0dc1b] to versions: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0-0.4.6, 0.5.0-0.5.10, 0.6.0-0.6.17, 0.7.0-0.7.15] or uninstalled, leaving only versions: 0.7.0-0.7.15
└─Juno [e5e0dc1b] log:
├─possible versions are: [0.1.0, 0.2.0-0.2.7, 0.3.0-0.3.2, 0.4.0-0.4.1, 0.5.0-0.5.5, 0.6.0, 0.7.0] or uninstalled
└─restricted to versions 0.5.4 by an explicit requirement, leaving only versions 0.5.4

If I try to add ASTInterpreter 2 (which is a surprise as I thought JuliaInterpreter replaced it), I got this:

(v1.1) pkg> add ASTInterpreter2
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package DebuggerFramework [67417a49]:
DebuggerFramework [67417a49] log:
├─possible versions are: 0.1.0-0.1.2 or uninstalled
├─restricted to versions * by ASTInterpreter2 [e6d88f4b], leaving only versions 0.1.0-0.1.2
│ └─ASTInterpreter2 [e6d88f4b] log:
│ ├─possible versions are: 0.1.1 or uninstalled
│ └─ASTInterpreter2 [e6d88f4b] is fixed to version 0.1.1
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left

(v1.1) pkg> add DebuggerFramework
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 [e6d88f4b]:
ASTInterpreter2 [e6d88f4b] log:
├─possible versions are: 0.1.0-0.1.1 or uninstalled
├─restricted by julia compatibility requirements to versions: uninstalled
└─restricted by compatibility requirements with Atom [c52e3926] to versions: 0.1.0-0.1.1 — no versions left
└─Atom [c52e3926] log:
├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0-0.4.6, 0.5.0-0.5.10, 0.6.0-0.6.17, 0.7.0-0.7.15, 0.8.0-0.8.2] or uninstalled
└─restricted to versions 0.7.14 by an explicit requirement, leaving only versions 0.7.14

Any clue? Thanks!

Do

rm -m DebuggerFramework ASTInterpreter2

in the Pkg REPL mode. Then reinstall things.

2 Likes

First, I’m grateful that you guys are answering questions online!

I tried this but still got error messages.

(v1.1) pkg> rm -m DebuggerFramework ASTInterpreter2
Updating C:\Users\zpan\.julia\environments\v1.1\Project.toml
[c52e3926] - Atom v0.7.14
Updating C:\Users\zpan\.julia\environments\v1.1\Manifest.toml
[e6d88f4b] - ASTInterpreter2 v0.1.1 #master (GitHub - JuliaDebug/ASTInterpreter2.jl: Re-write of ASTInterpreter for julia 0.6+)
[c52e3926] - Atom v0.7.14
[7057c7e9] - Cassette v0.2.2
[53a63b46] - CodeTools v0.6.4
[67417a49] - DebuggerFramework v0.1.2+ #master (https://github.com/Keno/DebuggerFramework.jl.git)
[33d173f1] - DocSeeker v0.2.0
[cd3eb016] - HTTP v0.8.0
[9fb69e20] - Hiccup v0.2.2
[83e8ac13] - IniFile v0.5.0
[7c4cb9fa] - LNR v0.2.0
[50d2b5c4] - Lazy v0.13.2
[739be429] - MbedTLS v0.6.8
[88034a9c] - StringDistances v0.3.1
[37b6cedf] - Traceur v0.3.0
[104b5d7c] - WebSockets v1.5.2

(v1.1) pkg> add DebuggerFramework
Updating registry at C:\Users\zpan\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package DebuggerFramework [67417a49]:
DebuggerFramework [67417a49] log:
├─possible versions are: 0.1.0-0.1.2 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.2
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left

(v1.1) pkg> add ASTInterpreter2
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 [e6d88f4b]:
ASTInterpreter2 [e6d88f4b] log:
├─possible versions are: 0.1.0-0.1.1 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.1
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left

You don’t need to install those packages at all anymore, so after pkg> rm DebuggerFramework ASTInterpreter2 you can just do a pkg> update and things should work fine.

1 Like

Thank you! I did that and got Juno.@enter working!

However I still got a problem while setting break point. Please help, I’m almost there! :grinning:

Take a look at

and
http://docs.junolab.org/latest/man/debugging/

2 Likes

Thank you, thank you, thank you!

After reading about using Revise and includet(), I was able to set the break point and make Juno.@run() work!

This debugger removed the last major hurdle for me to promote Julia to my colleagues at work. Actually I already started and got one interested, but another was saying “no GUI debugger is a big deal”. Now all is well. :slight_smile:

Great job and great product! Now I’m going off to have more fun with the power of Julia on my side… :muscle:

3 Likes

OK I’ve been playing with the debugger for a little bit. Once thing I notice is if I have calls like PyPlot.plot() or CSV.read(), the debugger will error out when executing them. Similarly, Revise.includet() would error out.

My guess is if there is foreign call to C or Python, the current debugger cannot handle it. Is my guess right? If so, is there a way to still allow stepping over them without stepping into these calls? I don’t expect Julia debugger to debug Python/C functions, but if I have to get rid of all non-pure Julia calls in my code, it may not be very feasible.

Thanks!

The debugger is meant to handle everything but since it is new there might of course still be bugs. Opening them with good examples with the code you try to run at GitHub - JuliaDebug/JuliaInterpreter.jl: Interpreter for Julia code is a good idea.

3 Likes

Thanks! Will open issues there.

2 Likes

I updated all packages, and updated Juno. [Every time I update Juno, Atom starts without the Julia menu, so I eventually tend to uninstall Atom and reinstall it… Anyway…]

With new version of Juno, I opened a file, and clicked in the left margin to set a break point. This caused an error message:

Error in Debugger
no signatures found at C:\Users\unsername\OneDrive\...\file.jl, 12.
Restarting and `using Revise` and the relevant package may fix this problem.

OK – I have not installed Revise, and it seems like Reviseis used. But what is meant by the relevant package?

Next, I added Revise, started Juno, and issued command using Revise. The same error message shows up.

So what am I doing wrong?

http://docs.junolab.org/latest/man/faq/#Juno-doesn’t-work-properly-after-some-Atom-packages-were-updated.-What-do-I-do?-1

Revise needs to be aware of the code you’re trying to set the breakpoint in, so you need to Revise.track or includet your file first (unless it’s part of a module, in which case using or importing that module is enough).
In the (hopefully) near future it won’t be necessary to use Revise for these kinds of breakpoint though.