'dump' beyond stdout

My Julia programs generally have number of mutable structs, each containing some multi-dimensional arrays. Sometimes I just want to quickly inspect what is going on with them and for that the best tool I found is dump. However it becomes quite unwieldy when the dimensions of my arrays get large.

What I would ideally like is a dump that shows its output in a separate window (like for plots), where substructures are collapsable (like the directory tree in a file explorer) and with horizontal and vertical scrollbars (so there is no wrapping which is always confusing when dumping a matrix).

Does such a tool exist? It sounds simple to implement and I think it would be amazing to have.

1 Like

If you’re using VS Code, then the Julia extension adds the “Julia” tab to the Activity Bar. In there you can see all variables defined in the current REPL and open them as tables in their own tab.

1 Like

Thanks, exactly what I needed.

Edit: actually, it seems that most arrays are not viewable as a table in their own tab, even for something as basic as a Vector{Float64} inside a mutable struct. Do you know why that would be the case?

1 Like

Not sure if that’s intentional but you can use the REPL to open data in the table viewer using the vscodedisplay function (see here).

struct Test
    a::Vector{Float}
end
x = Test(rand(10))
vscodedisplay(x.a)

HTH?

1 Like

Yes! Thanks again.

1 Like