# VS Code: Julia Env different in status bar and REPL

**URL:** <https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369>\
**Category:** New to Julia\
**Created:** [March 17, 2021, 10:29am UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369 "2021-03-17T10:29:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 17, 2021, 10:29am UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/1 "2021-03-17T10:29:52Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/3/7/37d480c63c9ce7997fd5aff06926bdf6e219ee60.png)

As title already says, why does VC Code show two different activatated envs? I want to work in Oceananigans instead of in v1.5 but the REPL doesnt change.

---

<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:** [March 17, 2021, 10:48am UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/2 "2021-03-17T10:48:30Z")

</div>

Yeah, that’s a bit unfortunate. I think you can click on the Project.toml in the sidebar and select `Julia: Activate this environment`. Although that only works in the built-in REPL, not when opening one from your shell like in the screenshot; you need to type e.g. `activate .` in that case or start Julia with `julia project=.`.

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 17, 2021, 11:49am UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/3 "2021-03-17T11:49:39Z")

</div>

Thanks, but that doesnt work. I did `Julia: Activate this environment` but then my env switched to ‘benchmarks’.  
The other suggestions have been leading to errors so far.  
Why is there the difference between the status bar and REPL at all? Is this a VS Code bug?

---

<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:** [March 17, 2021, 11:52am UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/4 "2021-03-17T11:52:35Z")

</div>

I mean you have to select the right environment, no? So don’t click on `benchmarks`, click on `Oceananigns.jl`.

> [@meck](#):
>
> The other suggestions have been leading to errors so far.

What errors are you seeing?

> [@meck](#):
>
> Why is there the difference between the status bar and REPL at all? Is this a VS Code bug?

Because the two aren’t synced at the moment (and never will be for any non-integrated REPL sessions like you’re running in the screenshot).

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 17, 2021, 12:25pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/5 "2021-03-17T12:25:59Z")

</div>

Your first suggestion worked, I didnt realize there were several project.toml files in the sidebar. Sorry for the confusion.

I have one more question. When running a file, the panel used to show the output in the “Terminal” tab. Now its switching automatically to “terminal”. Why is this? All those problems occured since the last VS Code update.

---

<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:** [March 17, 2021, 12:28pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/6 "2021-03-17T12:28:01Z")

</div>

No worries.

> [@meck](#):
>
> When running a file, the panel used to show the output in the “Terminal” tab. Now its switching automatically to “terminal”. Why is this? All those problems occured since the last VS Code update.

Can you share a screenshot/gif of what’s happening? I haven’t seen/heard of anything like this before. Also, what VSCode version are you using right now?

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 17, 2021, 12:56pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/7 "2021-03-17T12:56:46Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/b/2/b2e91d0cedeb8e39abc487536102ad53b4dac687.png)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/f/fffc232c69c81adeca9d30cba9408130b2102775.png)

So when I`m running a file I expect the output to be in the terminal behind “julia\>”. Instead the panel switches automatically to “output”.  
I guess practically it doesnt make much of a difference since the information is the same. But I have to switch back manually every time I want to operate in julia.

---

<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:** [March 17, 2021, 12:59pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/8 "2021-03-17T12:59:27Z")

</div>

That command isn’t from the Julia extension. You’ll want to use `Julia: Execute File in REPL` instead.

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 17, 2021, 1:15pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/9 "2021-03-17T13:15:51Z")

</div>

Huh, thanks. But that wasnt always the case was it? I am rather new to Julia and VS Code but the last two weeks I was running the files without the extra command.

The version btw is:

Version: 1.54.3  
Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8  
Date: 2021-03-16T00:31:32.470Z  
Electron: 11.3.0  
Chrome: 87.0.4280.141  
Node.js: 12.18.3  
V8: 8.7.220.31-electron.0  
OS: Linux x64 5.4.101-1-MANJARO

---

<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:** [March 17, 2021, 1:44pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/10 "2021-03-17T13:44:51Z")

</div>

The command got renamed and moved into the context menu. Apart from that nothing changed (although you might’ve installed another extension that provides the “Run Code” command).

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 17, 2021, 4:19pm UTC](https://discourse.julialang.org/t/vs-code-julia-env-different-in-status-bar-and-repl/57369/11 "2021-03-17T16:19:22Z")

</div>

Thank you
