Reputation: 644
vs code version:1.29.1(1.29.1)
python version:3.6.5
{
"name": "Python",
"type": "python",
"pythonPath":"${config.python.pythonPath}",
"request": "launch",
"stopOnEntry": true,
"console": "none",
"program": "${file}",
"cwd": "${workspaceRoot}",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
],
"env": {"name":"value"}
}
workspacesettings:
{
"python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
"python.linting.pylintEnabled": true
}
When I test for debugging, I got failed.
It's said "You need to select a Python interpreter before you start debugging". But I actually choice one version shows in the lower left corner.
Any part is incorrect?
Upvotes: 2
Views: 307
Reputation: 644
I edit as the code below and it works!!
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true
}
Upvotes: 1
Reputation: 2494
The documentation that has been given here in the website of VS Code may be helpful. Did you try getting reference from here? https://code.visualstudio.com/docs/python/debugging
Upvotes: 0