Ways to Open a Command Palette
- Use Menu
Menu -> View -> Command Palette...
. - Use the shortcut
Shift + Command + P
(on macOS).
You can search for commands in the Command Palette, which makes things very convenient.
Run Tests or a Python File
- Open the Command Palette.
- Search for
Python: Run
in the Command Palette. - Select the right command to run for your case.
Debug Tests or a Python File
- Open the Command Palette.
- Search for
Python: Debug
in the Command Palette. - Select the right command to run for your case.
Examplel of Debugging Configuration
launch.json
for debugging Python code.
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}