Home >Development Tools >VSCode >How vscode relates to python

How vscode relates to python

王林
王林Original
2020-02-12 14:10:454429browse

How vscode relates to python

Download the python plug-in

How vscode relates to python

##Install the Python 3 version and choose a Python interpretation Interpreter

In VS Code, select the Python 3 interpreter by opening the Command Palette (Ctrl Shift P) and start typing Python: Select the Interpreter command to search, then select the command, and when finished bottom

Writing demo

Create a folder at will. In vscode, file => open the folder, and create a new file ending with .py in the folder.

For example, right-click to run the python file in the terminal

msg = "hello world"
print(msg)

debug configuration

How vscode relates to python

Return to the hello.py file, press F9 on the print line to indicate a breakpoint, and directly press F5 to start debugging. The debugging effect is as follows:

How vscode relates to python

At this point, the python program can already run and debugged.

Recommended related articles and tutorials:

vscode tutorial

The above is the detailed content of How vscode relates to python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn