我想使用虚拟环境的Visual Studio代码。在启动JSON我指定的nosetests推出这样的:Visual Studio代码和virtualenv
{
"name": "nosetests",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"program": "${workspaceRoot}/env/dev/bin/nosetests",
"args": [
"--nocapture",
"tests"
],
"externalConsole": false,
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit"
]
},
然而,当我启动的环境变量没有得到回升。我已经尝试在工作区设置中设置python路径:
"python.pythonPath": "${workspaceRoot}/env/dev/bin/python"
但它似乎没有设置正确的环境。需要有一些“等同于源激活的东西”。有没有人知道它?