I have a conda project with visual studio code. I wish that, every time in the project folder when I open my powershell, the command conda activate v_env
is executed automatically. From the answer here, VSCode: How to run a command after each terminal open?, I create a json document :
{
"terminal.integrated.profiles.windows": {
"My PowerShell": {
"path": "pwsh.exe",
"args": ["-noexit", "-file", "conda activate v_env"]
}
},
"terminal.integrated.defaultProfile.windows": "My PowerShell"
}
I tried:
- Name the file
settings.json
and put it in.vscode
. - Name the file
tasks.json
and put it in.vscode
.
But neither of the two works. When I open powershell, it is like nothing was typed. I believe that this is because I did not put the json at a correct location or I did not use the script correctly. How do I proceed?