Python official homepage Install Python from the link above
Python Press Command Pared (Ctrl + P) and execute the following command
Command pared
ext install python
A. Press Command Pared (Ctrl + P) and execute the following command
Debug pared
> debug: Open launch.json
B. Press the launch.json button in the debug sidebar


Created launch.json file
json:.vscode/launch.json
{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Python",
			"type": "python",
			"request": "launch",
			"stopOnEntry": true,
			"program": "${file}",
			"debugOptions": [
				"WaitOnAbnormalExit",
				"WaitOnNormalExit",
				"RedirectOutput"
			]
		},
....abridgement
| option | argument | 
|---|---|
| "program": "${file}" | Starts the currently active file | 
| "program": "${workspaceRoot}/file.py" | File at root.Start py | 
After editing launch.json, start debugging with F5

| option | Description | 
|---|---|
| program | Path to the Python file to be debugged | 
| pythonPath | Absolute path of Python interpreter,Use when you want to use multiple versions of Python properly | 
| args | Arguments passed to execution | 
| stopOnEntry | If enabled, it will stop at the first line when starting debugging | 
| externalConsole | If enabled, console/It will be displayed in the terminal window | 
| debugOptions | Debugging options | 
| env | Used to set Custom environment variables for the debugging process | 
Recommended Posts