Home > Article > Development Tools > How does vscode run py files?
How does vscode run py files?
1. First, you need to make sure that the Python plug-in of VScode is installed. Open the Python script. You can drag it in directly, click on the file, and click on the user settings in the preferences. The user settings configuration file will appear.
#2. Then search for the Python keyword in the left file Ctrl F and find the line where pythonPath is located.
3. Then copy the file where Python is located to the file on the right, pay attention to the direction of the slash, delete the trailing comma, and press Crtl+S to save when finished.
#4. Then switch to our program file again, Ctrl shift B to run the program. At this time, you will be prompted to configure the task runner, click Configure.
#5. Choose to run any external command menu.
6. In the opened tasks.json file, two contents need to be modified, the path and the execution file name.
#7. After the final configuration is completed, the Python code can now be run directly with Ctrl shift B.
Related recommendations: vscode introductory tutorial
The above is the detailed content of How does vscode run py files?. For more information, please follow other related articles on the PHP Chinese website!