You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want a function that lists all of the global variables in package main. Specifically, I want a list of variables declared with Eval("var x = 1") and Eval("y := 1").
// Globals returns a map of global variables and constants in the main package.func (*Interpreter) Globals() map[string]reflect.Value
Background
I have developed an extension that implements Yaegi-based notebooks for Visual Studio Code. I want to add a variables view, like the Jupyter extension has for their notebooks.
Workarounds
I don't think there are any. I was going to show a horrible hack using the debugging interface, but I don't think that exposes global variables. The Symbols function only returns exported values.
The text was updated successfully, but these errors were encountered:
Proposal
I want a function that lists all of the global variables in
package main
. Specifically, I want a list of variables declared withEval("var x = 1")
andEval("y := 1")
.Background
I have developed an extension that implements Yaegi-based notebooks for Visual Studio Code. I want to add a variables view, like the Jupyter extension has for their notebooks.
Workarounds
I don't think there are any. I was going to show a horrible hack using the debugging interface, but I don't think that exposes global variables. The Symbols function only returns exported values.
The text was updated successfully, but these errors were encountered: