Reputation: 31
I'm new to python (and in coding in general). I'd like to ask some help to set up python on VS Code. I've tried to follow several guides but none of them were really helpful.
The following have been downloaded:
Upvotes: 3
Views: 5873
Reputation: 109
This worked for me:
{
"python.linting.pylintEnabled": false,
"python.pythonPath": "python.exe"
}
{
"version": "2.0.0"
}
{
"version": "2.0.0",
"configurations": [
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceRoot}",
"console": "internalConsole",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
}
]
}
You can replace "program": "${file}",
with "program": "${workspaceRoot}/main.py",
to run your main file no matter which file you've selected but I found that that makes errors like syntax errors sometimes not display correctly if at all.
CTRL + SHIFT + D
BREAKPOINTS
panel, click on Uncaught Exceptions
enter image description hereUpvotes: 2
Reputation: 8392
1) Install VS Code
2) Go to View > Command Palette
3) Type ext install and click on Install Extensions
4) Search for Python and install it
5) Reload VS
6) Start coding
Upvotes: 3