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.
Table of Content
- What is Visual studio code?
- Benefits of Visual Studio Code
- Install and setup Visual studio code
- Setup Visual studio code with extension’s and plugins
- How to run python program in visual studio code
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.
- 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.
- Once the zip file is downloaded move to any folder such as C:\Desktop\Softwares.
- 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.
- Now the Visual studio code main screen should come up and confirms successful installation of 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.
- First install python from official site of python on your windows machine. To install and download Python checkout how to install python on windows machine.
- Now, execute the
pythoncommand on command prompt to verify if python is successfully installed on your machine.
- Next, hop over to the Visual studio code , click on extension’s and search for Python. You should see a Python extension.
- Further click on Install, to install the Python extension.
- It takes few seconds to install the Python extension and once installed , it will reflect in installed section.
- Also once python extension is installed you will notice at the bottom status bar will show you Python interpreter details.
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")
- Now switch to Visual studio code again and click on the File ➔ Add folder to workspace and select python folder that you created previously.
- Finally execute the Python code and as you can see the code has successfully executed.
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?