Recorded:
Premise:
Python is installed
Installing the Pthon module in the VSC
Quick Start
Open Console (ctrl+shift+p): Python:select interpreter, select Python Interpreter
Or click Select Python environment below the software
Smart completion: Smart complements work under the Python standard library and packages in the Python environment you set up;
In the software below the terminal, you can add or remove the terminal as needed;
Debugging Tools:
Edit Python
Auto-completion and IntelliSense can work under the current work environment and Python-standard-installed libraries (PIP-installed libraries), and if they are required to work in other packages, You need to put the path of this package into the python.autoComplete.extraPaths in the settings file:
"python.autoComplete.extraPaths": [
"C:/Program Files (x86)/Google/google_appengine",
"C:/Program Files (x86)/Google/google_appengine/lib" ]
Similarly, python.autoComplete.preloadModules settings can be added to common modules in advance:
" Python.autoComplete.preloadModules ": ["numpy""pandas""matplotlib "],
Finally, the Python.autocomplete.addBrackets setting can decide whether to automatically add "()" After the function name when typing the function name;
Refactoring
Extracting variables
To the right of an expression, click the extract variable, the editor will automatically add a variable named newvariablennn, you can change the name;
Extraction method
Ditto
Sort Import Statements
For the import module, the right-order import statement will combine the statement from the same module into a package;
Linting
Linting can cause code syntax and style errors to be highlighted;
Visual Studio Code--Python