xxxxxxxxxx
# Use the following command in terminal or command prompt
code <path_to_folder_or_file>
# Note: Replace <path_to_folder> with . to open code in current directory
# Example:
code C:\repos\hello-world
code .
# Refer the source for additional options with the code command
xxxxxxxxxx
"python.terminal.executeInFileDir": true,
"code-runner.fileDirectoryAsCwd": true
Add the above lines to Settings.json in vscode