Is there a way to have a Variable Explorer in Julia?

Hi there!

I come from Python and more specifically, Spyder. Spyder has a wonderful variable explorer which has really optimized my workflow. Is there something similar for Julia?
I had a quick look around here and in VS Code’s extensions but I got nothing.

1 Like

Hello and welcome to the community.
The variable explorer is available here

9 Likes

If this is an important aspect for you I suggest to still use Atom/Juno. The variable explorer there is way more well-cured than what is currently available in the VSCode plugin…

2 Likes

Would be good to know what you’re missing in the VS Code extension compared to Juno.

3 Likes

Atom:

VSCode:

Some “features” that I miss is the workspace filtering and the click-to-go-to-definition present in Juno, but mostly is it a matter of readability:

  • font size: note how in atom the Workspace font is bigger than the code font, in VSCode is the opposite
  • the workspace of VSCode is “polluted” with stuff like eval, include,
  • the icon/symbolism is much more beautiful/make sense in atom: a cube for a module, lambda for a function, n for a value and the list symbol for an array. The different types of parenthesis and the hash symbol in VSCode are both ugly and confusing (of course, this remains subjective…)

That said, VSCode is much faster and more reliable than Juno… but ugly and less ergonomic…

5 Likes

So I agree that the defaults aren’t particularly pretty in VS Code, but you can configure many of these things:

  1. Font size: a combination of window.zoomLevel and editor.fontSize/terminal.integrated.fontSize allows you to increase the UI font size
  2. Fair, but also kinda intended.
  3. You can use a different product theme
  4. There is filtering in all VS Code tree views – just start typing and a pop-up appears in the upper right.

With a bit of config your workspace could look like this:

3 Likes

I remember seeing recent announcements of packages that could help with interactive exploration of Julia objects and code. I could only find this one in my quick search now, but there are others:

Eyeball.jl might’ve been the other one:

2 Likes

I don’t see that workspace in mine. Only see variables where matrices display like in this (very little usable) form.

1 Like

That’s the debugger variables viewer, no? Slightly different code, unfortunately, and slightly less useful in many cases.

1 Like

Note that the vim extension modifies this. You have to type / first:

1 Like

Yeap, that’s when I need more to see the contents of variables.

That is so much prettier than the default. Simply making whatever changes you have made the default would already be a huge improvement.

Is there functionality to the workspace viewer that I’m missing? It shows the classes, variables, etc., in the workspace but you can’t click on those elements to get any further information or to jump to the code. Which makes it not very useful for me.

Is there a way to configure VSCode to enable more functionality in the workspace view?

The “Workspace” is about runtime state. Check the “Outline” for info on what’s defined in any given file.

Side question: can you explore nested structs/dicts in inline evaluation in VScode as in Juno?
image

1 Like

It would be useful to have some connection from runtime names to the source code of the values. For example, given a function f, julia can find methods(f) which can find the source locations.

1 Like

Is it possible to make the workspace viewer an expandable tree by type ?

So I could just look at all my DataFrames or Dictionaries for example.

Not the same but you might like Eyeball.jl

1 Like