'Visual studio code will not activate conda env specified in launch.json

My launch.json config looks as follows:

{

"version": "0.2.0",
"configurations": [
    {
        "name": "Python: Current File",
        "type": "python",
        "request": "launch",
        "python": "/Users/username/miniconda3/envs/env_name/bin/python",
        "program": "${file}",
        "console": "integratedTerminal",
    }
]

}

However, when I run the debugger, the specified env_name is not run. Instead the default interpreter python version (3.10) is run. Why is the specified environment not being activated?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source