# Significance of Current Module in VS Code

**URL:** <https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469>\
**Category:** VS Code\
**Created:** [April 2, 2021, 10:37pm UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469 "2021-04-02T22:37:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [April 2, 2021, 10:37pm UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469/1 "2021-04-02T22:37:45Z")

</div>

The code I’m developing is in a module `RBSilly`, which is what shows as the Current Module on the lower right of my VS Code window.

But when I enter code in the Julia REPL window at the bottom, it does not seem to be evaluating in that context. The module defines a function `fit` and to access it from the REPL I must say `RBSilly.fit`; the unqualified name is not known.

So I’m guessing the Current Module setting is only intended for code open in the editors. Is that correct?

And if I’d like to be in the `RBSilly` namespace in the REPL, what can I do? I suppose I could `using RBSilly` in the REPL (although maybe it would need to find the file?), but then I worry this would not stay current as I made edits to the file.

I am using `Revise`.

---

<div class="post-metadata">

**Author:** ![doit](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@doit](https://discourse.julialang.org/u/doit)\
**Post date:** [April 3, 2021, 8:49am UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469/2 "2021-04-03T08:49:01Z")

</div>

If I understand correctly, your package is already in scope in the REPL as you can use “RBSilly.fit”, an additional “using RBSilly” wouldn’t help.  
Are you exporting your function with “export fit” in your module?

---

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [April 5, 2021, 4:53pm UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469/3 "2021-04-05T16:53:51Z")

</div>

The module has no exports. I thought the meaning of the VS Code indication that I’m in the RBSilly module is that I have access to the names as if I were inside the module.

I am executing the commands in the REPL after telling VS Code to run the file with the module in the REPL.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [April 5, 2021, 5:27pm UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469/4 "2021-04-05T17:27:23Z")

</div>

The current module is only set for inline evaluation. Juno for example also changes it for the REPL, but many users found that confusing.

---

<div class="post-metadata">

**Author:** ![Ross\_Boylan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ross_boylan/32/9210_2.png) [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Post date:** [April 6, 2021, 7:29pm UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469/5 "2021-04-06T19:29:30Z")

</div>

Thanks for the info. I don’t know if it’s possible, but it might be nice not to display the “current” module when focus is in the REPL. I noticed it changed when I moved from editing one file to another, and so this seems in the same spirit.  
Ross

---

<div class="post-metadata">

**Author:** ![einar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/einar/32/25940_2.png) [@einar](https://discourse.julialang.org/u/einar)\
**Post date:** [November 16, 2021, 7:25am UTC](https://discourse.julialang.org/t/significance-of-current-module-in-vs-code/58469/6 "2021-11-16T07:25:07Z")

</div>

I just had the same confusing moment

If the “Current Module” does _not_ affect the REPL, as described above, I think it would be a proper visual feedback to make it switch back to “Main” when REPL is in focus, as @Ross_Boylan suggested

PS  
I went to the official documentation and searched for this but could not find it. Maybe add just a mention somewhere?
