Inside a debugging session with Debugger.jl
, is it possible to display plots (I’m currently using Plots.jl, but willing to use any package) from the julia prompt? I can save the plots to disk, but it would be nice to just pop them out into a window!
Yes.
(@v1.7) pkg> st
Status `~/.julia/environments/v1.7/Project.toml`
[31a5f54b] Debugger v0.7.6
[91a5bcdd] Plots v1.27.6
julia> using Debugger
julia> function f(x)
x + 1
end
f (generic function with 1 method)
julia> @enter f(1)
In f(x) at REPL[3]:1
1 function f(x)
>2 x + 1
3 end
About to run: (+)(1, 1)
1|julia> using Plots # First press ` (backtick) to enter REPL mode
1|julia> plot(randn(100)) # Plot appears in separate window
1|debug> c # First press backspace to exit REPL mode
2
Thanks @StevenWhitaker. It does work for me now as well. I upgraded Plots.jl to the latest version which might have fixed things for me.