How to Install Visual Studio Code on Windows machine

Are you looking for a code editor that supports multiple languages and plugins? If yes, you have come to the right place to learn about one of the world’s most widely used code editors Visual Studio Code.

In this tutorial, you will learn what visual studio code is and how to install Visual studio code step by step from scratch. Still interested?

Let’s get into it.

Join 28 other followers

Table of Content

  1. What is Visual studio code?
  2. Benefits of Visual Studio Code
  3. Prerequisites
  4. Install and setup Visual studio code
  5. Setup Visual studio code with extension’s and plugins
  6. How to run python program in visual studio code
  7. Conclusion

What is Visual Studio Code?

Visual Studio Code is a light weighted code editor which can be installed on multiple operating systems such as windows operating system, Linux, and macOS. The beauty of this code editor is it can work with various languages together and supports multiple languages. Also, it has strong plugin installation capabilities.

Benefits of Visual Studio Code

Let’s look at some of the benefits of Visual Studio code in this section.

  • Visual Studio code automatically complete the code variables, methods and module because of its intelligent nature.
  • Visual Studio code comes with variety of in built themes which can be used while running the code.
  • Visual Studio code works with top extensions in industry which provides ease to use code inside the editor.
Visual Studio Plugins and extensions
Visual Studio Plugins and extensions

Prerequisites

  • Windows 7 plus machine is reqyuired.
  • .NET Framework 4.5.2 or higher is required. If you dont have .NET Framework 4.5.2 or higher , please install from here

Install Visual studio code

Now that you have a basic idea about Visual studio and why you need this. Let’s get into the installation part.

  • First open your favorite browser may be google chrome and click on the link here to install the Visual studio code zip file.
Downloading Visual studio code
Downloading Visual studio code
  • Once the zip file is downloaded move to any folder such as C:\Desktop\Softwares.
Viewing the Visual studio installer downloaded.
Viewing the Visual studio installer downloaded.
  • After you click on the windows zip installer, it will extract all the files in a folder as shown below. Finally click on Code to open Visual Studio Code.
Extracting the Visual studio installer
Extracting the Visual Studio installer
  • Now the Visual studio code main screen should come up and confirms successful installation of Visual studio code.
Opening the visual Studio code
Opening the Visual Studio code

Setup Visual studio code with extension and plugins.

Now that you have Visual studio code installed, which is great, you require plugins and extensions to work with various languages and tools. With more extensions, you make the editor better and more useful. Let’s install the Python extension in Visual studio code to kick off this section.

  • Now, execute the python command on command prompt to verify if python is successfully installed on your machine.
Executing the Python command on windows machine
Executing the Python command on the windows machine
  • Next, hop over to the Visual studio code , click on extension’s and search for Python. You should see a Python extension.
Checking Python Plugin
Checking Python Plugin
  • Further click on Install, to install the Python extension.
Installing Python Plugin
Installing Python Plugin
  • It takes few seconds to install the Python extension and once installed , it will reflect in installed section.
Installed Python Plugin
Installed Python Plugin
  • Also once python extension is installed you will notice at the bottom status bar will show you Python interpreter details.
Viewing the Python Interpreter.
Viewing the Python Interpreter.

How to run python program in visual studio code

Earlier, you installed the Python plugin in the Visual studio code, which allows you to write Python code easily and effectively. Let’s create a Python code and run a simple Python program in visual studio code.

  • Create a folder on desktop named python and create a file inside it named main.py and copy/paste the below code.
print("I just installed visual studio and its working fine")
print("Thanks automateinfra.com for taking through this tutorial")
Python folder creation containing main.py file
Python folder creation containing main.py file
  • Now switch to Visual studio code again and click on the File ➔ Add folder to workspace and select python folder that you created previously.
Adding the Python code in main.py file
Adding the Python code in the main.py file
  • Finally execute the Python code and as you can see the code has successfully executed.
The Python code in the main.py file

Conclusion

In this tutorial, you learned what visual studio code is and how to install visual studio code. You also learned how to install python extension and finally executed a successful python code.

This tutorial should give you a quick start to code editor visual studio code, so which applications do you plan to create in the visual studio next?