VSCode Extension and activiating project automatically

I am now to julia and have been using the VSCode extension for working on my project and writing julia code.

Everytime I launch julia, I have to run the file, which then opens the REPL. From here, it errors on package installs. I then have to right click the root folder (the top level folder of the project) and select “change to this directory.” From there, I have to open the package manager ( ]) and type activate . Then, running the project will work as normal, and I am able to rerun the project without repeating these steps for that session. When I restart the REPL, I have to repeat this process. Is there a way to automate this task? It would be a nice quality of life change.


What do you mean by I have to run the file?

When I activate the script by clicking the run button in the top right in VSCode. Does that help?

I am on my W11 system here - but I can test on Ubuntu later (it should run the same).

This is how I experience it:

Please note that I didn’t have to manually activate the environment. However, it is important to start your VS Code from the right directory (otherwise you might need indeed to perform “change to this directory” thing).

I see. Thank you! I’ll open VSCode from the correct directory from here on out and that will resolve it I think. Thanks again!

1 Like