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
When a module is selected in the VSCode GUI (either implicitly or explicitly), it doesn't actually change the REPL module.
Implicitly Selected (parentheses):
Explicitly Selected (no parentheses):
julia> x =33
julia> MyPackage.x
ERROR: UndefVarError:`x` not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:31
[2] top-level scope
@ REPL[3]:1
julia> Main.x
3
Currently, the module namespace can only be activated in the REPL manually with Alt+m.
julia> MyPackage # Alt + m
(MyPackage) julia> y =11
(MyPackage) julia> MyPackage.y
1
(MyPackage) julia> Main.y
ERROR: UndefVarError:`y` not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:31
[2] top-level scope
@ REPL[12]:1
It would be very convenient for the VSCode REPL module selection to synchronize with the VSCode GUI module selection. The current behavior often yields very confusing errors when trying to use Julia: Execute Code in REPL and normal REPL typing together.
julia> z =5# Ctrl + Enter a line in a file within the MyPackage module5
julia> z +2# Typed into REPL
ERROR: UndefVarError:`z` not defined
I have personally been confused by this error several times, and I have seen several other beginners encounter it on Discourse and StackOverflow as well.
The text was updated successfully, but these errors were encountered:
When a module is selected in the VSCode GUI (either implicitly or explicitly), it doesn't actually change the REPL module.
Implicitly Selected (parentheses):
Explicitly Selected (no parentheses):
Currently, the module namespace can only be activated in the REPL manually with Alt+m.
It would be very convenient for the VSCode REPL module selection to synchronize with the VSCode GUI module selection. The current behavior often yields very confusing errors when trying to use
Julia: Execute Code in REPL
and normal REPL typing together.I have personally been confused by this error several times, and I have seen several other beginners encounter it on Discourse and StackOverflow as well.
The text was updated successfully, but these errors were encountered: