Skip to content

Configuring Visual Studio Code

visual studio code

Visual Studio Code is an IDE (Integrated Development Environment) created by Microsoft which can be used on various platforms, such as -windows, linux and mac. Debugging, syntax highlighting, intelligent code completion, snippets, etc. are its notable features. We can also increase the functionality of VS Code by installing different extensions.

Nowadays Visual Studio Code is the most popular source code editor which is used for various types of program development like c, c ++, java, javascript, python, php etc.

The first Visual Studio Code was released on April 29, 2015.

Install Visual Studio Code in windows

To install Visual Studio Code, first go to this link https://code.visualstudio.com/download and click on the “Windows” box.

In the next step you have to run the downloaded file. In the pop-up that will come after running the downloaded file , you have to select the “I accept the agreement” option and click on “Next”.

In the next pop-ups, you have to leave everything by default and click on the “Next” button until the following pop-up appears. Check all the checkboxes in that pop-up and click on “Next” Button.

In the next pop-ups , you have to leave everything by default and click on the “Next” button until the pop-up with “Install” option comes up. When the “Install” option appears, click on the “Install” button. Once installed, uncheck the “Launch Visual Studio Code” in the pop-up that appears and click on the “Finish” button.

How to open a file in Visual Studio Code

There are many ways to open a file in Visual Studio Code. We will discuss three approaches here – 

Here is a file called “hello.txt” in the “Python tutorial” folder of my computer’s D drive. We will see how to open the “hello.txt” file in VS Code.

Method 1:

First we will open the VS Code by double clicking on the Visual Studio Code icon on the Desktop.

Now to go to the folder we need from this folder, click on the File menu and click on “Open Folder”.

Then browse to the required folder and click on the “Select Folder” button.

Then double click on the name of the required file and the file will be opened in VS Code.

Method 2:

In this way we will open the file in VS Code with the help of PowerShell. First we will press Shift and Right click together on the Desktop and then we will click on the “Open PowerShell window here” button of the pop-up that will come up.

Then type ‘cd “d:/Python tutorial”‘(In your case it will depend on your file structure) in PowerShell window and press Enter key which will take PowerShell to the required folder. Then type ‘code .’ in the PowerShell window and press Enter key which will open the required folder in VS Code.

Then double click on the file to open the file in VS Code.

Method 3:

This is the easiest way to open a file in VS Code. In this case first we will go to the required folder and right click in the folder. Then we will click on the “Open with Code” option of the pop-up that will open .After that folder will open in VS Code.

After the VS Code is opened, double click on the file to open the file in VS Code.

How to create a new folder in VS Code

To create a new folder in VS Code, first move the cursor to where the name of the main folder is written. Moving the cursor there will bring up four new icons, the second of which is to create a new folder. Click on the icon –

Clicking on that icon will open a new place. In that place you have to give new folder name. If you press Enter key after giving the folder name in that place, a new folder will be created.

Here we have created a folder named Folder1.

How to create a new file in a folder in VS Code

Here we will create a new file in the newly created folder Folder1. For that, first we have to select Folder1. Then we have to move the cursor to the main folder name where we can find four icons, the first of which is the option to create a file. We have to click on that icon.

Clicking on that icon will open a new place. In that place we have to give new file name. If we press Enter key after giving the file name in that place, a new file will be created in Folder1 folder.

Here we have created a new file named file1.py.

Thank you for reading this Article . If You enjoy it Please Share the article . If you want to say something Please Comment .

Leave a Reply