Then the env var “MYVAR” is added to the current debugging session. However, when I try to do the same for Julia, I get the error “Property env is not allowed.” Instead intellisense suggest a property called “juliaEnv” (Absolute path to the Julia environment), which seems to be an entirely different thing. What is the correct way to do this?
Can’t really think of any… I don’t think it would be difficult to properly add to the extension, if someone wanted to give it a go.
I think it should be enough to add support for envhere (ideally copy that from how another language does it), and then make sure that the values from args.env get added here and here.
The Python extension has this in its package.json, which can be directly copied to Julia; it not only supports “env”, but also “envFile” which allows users to input the env variables from a file. But unfortunately I am not familiar with the making of a VS Code extension, so may not be able to help make a pull request…
One workaround would be to set the environment variables and start Julia in a regular VSCode terminal session, then connect to that session (via the “Connect external REPL” command).
That won’t work. We spawn a new Julia process in the extension, and we (the extension) control what env vars are passed to it, so we’ll have to just implement that.