【发布时间】:2016-07-23 18:48:21
【问题描述】:
我正在尝试在虚拟环境中使用 Visual Studio Code。在 Launch JSON 中,我指定了这样的鼻子测试启动:
{
"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"
但它似乎没有设置正确的环境。需要有一些相当于源激活的东西。有人知道了吗?
【问题讨论】:
标签: python visual-studio-code nose