I have a Julia script named by xx.jl
, and I set the package and modules in another directory ../my_env
. So every time I want to run it, I used the command in the terminal Julia --project=../my_env ./xx.jl
. However, if I used the debug mode of VS studio, it always activate the environment/project under the current directory (where I didn’t install the package or module). So what can I do? I tried to modify the launch.json
as following:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "julia",
"request": "launch",
"name": "Run active Julia file",
"program": "${file}",
"stopOnEntry": false,
"cwd": "${workspaceFolder}",
"env": {},
// "juliaEnv": "${command:activeJuliaEnvironment}"
"juliaEnv": "/Users/xshan/Research/MPI/XXXX/examples/my_env"
}
]
}
But it doesn’t work…(Besides I am on Mac…