Coding in code editors like Visual Studio Code is great, as they provide numerous facilities to make your life as a programmer easier.
You’ll be able to appreciate them once you start programming.
You must be wondering🤔 why Visual Studio Code? If you want to know that click here.
You can also use other code editors like pycharm or Thonny. (thonny is good for visualizing the code it’s useful for debugging.)
This tutorial teaches you how to set up Visual Studio Code for a Python environment so that you can edit, run, and debug Python code.
Contents
Setting up Visual Studio Code
To set up the VS Code, you follow these steps:
First, go to the VS Code official website and download the VS code based on your system (Windows, macOS, or Linux).
Second, double-click the exe. And then follow the steps it provides.
Once the installation is completed, you can launch the VS code application:
Get the Python Extension
To make the VS Code work with Python, install the Python extension from the Visual Studio Marketplace.
The following picture has the steps:
- First, go to the Extensions tab.
- Second, type the python on the search.
- Third, click the Python extension. It’ll show detailed information on the right pane.
- Finally, click the Install button to install the Python extension.
Now, you’re ready to develop the first program in Python.
You can explore other ways to write and execute your python code here.