Now that you have VSCode installed and know how to open it, we need to discuss one final topic before you start creating your Python programs: VSCode Python extensions. You should see VSCode as a basic framework. It can do things like:
- Open, edit, and save files
- Lets you work on projects
- Start in-app terminals to keep things together
- Manage extensions
- Advanced code completion, where it suggests useful ways to continue with what you are typing, taking the context into consideration
- Integration with Version Control Systems like Git
- Integration with cloud-based services, like GitHub, Docker Hub, etc.
How to install extensions
To install an extension in VSCode, you can press the large extensions button on the left, as shown in the following screenshot:
It will open the extensions marketplace. In there, enter Python in the search bar to find all extensions related to Python. You can click the extensions to read more about them and press the install button to install an extension.
The Best VSCode Python Extensions
You at least want to install the official Python extension for Python programming. It offers many features you’ll need, like IntelliSense, linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, snippets, and more. You’ll automatically get the Pylance plugin when you install this plugin.
MagicPython is a cutting-edge version of the default Python syntax highlighter in VSCode. You don’t need it unless you use cutting-edge Python versions, but I always install it just to be sure.
Visual Studio IntelliCode
Python Extension Pack
If you want to get a nice selection quickly, you can also install the Python Extension Pack. I personally prefer to pick my own selection since packs like these may change their selection of extensions at any moment and perhaps add things I don’t want.