-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Description
Issue Type
Bug
Description
In your settings.json file, add the following line to map to your python path
"python.pythonPath": "${workspaceRoot}/bin/python",
In your launch.json file, refer to that location via the following line in one of your configs:
"pythonPath": "${config:python.pythonPath}",
Below is an example of one of my launch targets...
{
"name": "smbsite - Run Nose Unit Test With Coverage (No debug)",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceRoot}/.vscode/run_nose.py",
"pythonPath": "${config:python.pythonPath}",
"cwd": "${workspaceRoot}",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
],
"env": {
"DJANGO_SETTINGS_MODULE":"wifast.smbsite.settings",
"WIFAST_ENVIRONMENT":"testing",
"WIFAST_OVERRIDE_ENVIRONMENT":"1",
"ENV":"local",
"HOST":"0.0.0.0"
},
"args": [
"${file}",
"-v",
"-s",
"--with-coverage",
"--cover-erase"
]
}
Until the most recent software version, it would substitute in the workspace root path with the real path from settings.json. Now it treats ${workspaceRoot} as literally the path prefix to python and any script referring to config in settings.json from launch.json no longer works and fails when run with the error "Failed to launch the Python Process, please validate the path '${workspaceRoot}/bin/python'"
VS Code Info
VS Code version: Code 1.20.0 (c63189d, 2018-02-07T17:02:34.244Z)
OS version: Darwin x64 17.4.0
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200) |
Load (avg) | 2, 2, 2 |
Memory (System) | 16.00GB (2.96GB free) |
Process Argv | /Applications/Visual Studio Code.app/Contents/MacOS/Electron |
Screen Reader | no |
VM | 0% |
Extensions (13)
Extension | Author (truncated) | Version |
---|---|---|
vscode-github | Kni | 0.26.0 |
vscode-eslint | dba | 1.4.6 |
githistory | don | 0.4.0 |
gitlens | eam | 8.0.2 |
vscode-npm-script | eg2 | 0.3.3 |
code-runner | for | 0.8.7 |
Python-autopep8 | him | 1.0.2 |
vscode-flake8 | jay | 0.0.4 |
Go | luk | 0.6.76 |
MagicPython | mag | 1.0.12 |
python | ms- | 2018.1.0 |
debugger-for-chrome | msj | 4.1.0 |
python | tht | 0.2.3 |