vscode
settings.json
{
"python.pythonPath": "/Users/<USERNAME>/miniconda3/envs/<CONDA_ENV>/bin/python"
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python Module",
"type": "python",
"python": "/Users/<USERNAME>/miniconda3/envs/<CONDA_ENV>/bin/python",
"request": "launch",
"program": "/Users/<USERNAME>/miniconda3/envs/<CONDA_ENV>/bin/<COMMAND>",
"console": "integratedTerminal",
"args": [
"hello-world"
],
"cwd": "${workspaceRoot}",
"<FOLDER_OR_PACKAGE>": true
}
]
}
If we translate to english.
Go to
cwd.Use
pythontolauncha launcher.Launcher run
programwithargswhich will run your command with args.The result will show on
console.This config is for
FOLDER_OR_PACKAGEonly, not whole workspace.
shortcut
choose Python Interpreter cmd+P