How to Install and Use Visual Studio Code on Windows 11

By Aditya Dhanraj Add a Comment 11 Min Read
Installing Visual Studio Code on Windows 11

Visual Studio Code, commonly known as VS Code, is a popular, free, and open-source code editor developed by Microsoft. It’s a versatile tool for coding, text editing, and debugging that’s widely used by developers across various programming languages and platforms. In addition to these features, it includes support for embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring. You can even add plugins to enhance the features of Visual Studio Code.

So, for your programming needs or source code editing, you can use Visual Studio Code (VS Code). In this blog, we’ll guide you through the process of installing and using Visual Studio Code on Windows 11. Without ado let’s get started.

Features of Visual Studio Code

The features of Visual Studio Code are continually evolving with each new update. Nevertheless, it’s important to highlight some of the commonly used and valuable features of Visual Studio Code that make a strong case for why you should use VS Code.

  • Search include/exclude folders – Quickly set folders to include/exclude in the tree view.
  • Command Center mode shortcuts – Displays commonly used modes before the recent files list.
  • Merge editor improvements – Access Combination option to auto-merge conflicts.
  • Markdown automatic link updates – File and image links are updated on rename/move.
  • More audio cues – Task completed or failed, Terminal Quick Fix available.
  • vscode.dev protected branch workflow – Create a new branch when committing to a protected branch.
  • New Python extensions – New standalone extensions for isort, Pylint, and Flake8.
  • Dev Container Templates – Create new Dev Containers based on existing templates.

Here, you can check what’s new in the Visual Studio Code 1.73 build.

How to Install and Use Visual Studio Code on Windows 11

Let’s dive into the steps to download and install VS Code on Windows 11.

1. Download VS Code

The first step is to download the Visual Studio Code installer for Windows 11. To do this, follow these steps:

1. Open any browser on your system.

2. After that, visit code.visualstudio.com and download the Windows version of Visual Studio Code.

3. To download, click on Download for Windows, and from the drop-down menu select Windows x64. It will download the Windows installer file.

Download VS Code for Windows

Note

Visual Studio Code is also available for other operating systems like macOS and Linux (Ubuntu, Debian, Red Hat, Fedora).

2. Installing VS Code on Windows 11

After you’ve downloaded the installer file, you can follow the steps below to install Visual Studio Code on your system with the correct settings.

1. Open the Visual Studio Code installer file.

2. A setup window will appear. Here, read the license agreement and accept it by clicking on I accept the agreement.

3. Then click on Next to continue.

License Agreement of VS Code

4. Now, select the installation location where you want to install Visual Studio Code. If you don’t have a good reason to change the installation location, then leave it at the default setting and click on Next to continue.

Select Destination Location from VS Code

5. After that, provide a name for the Start Menu folder. By default, it is named Visual Studio Code, but you can choose another name if you prefer. Additionally, at the bottom, you’ll find an option to not create a Start Menu folder.

6. Then, click on Next to continue.

Select Start Menu Folder

7. In the next window, you’ll get an option to select additional tasks – like create a desktop icon, Add to Path, and more. Select the option you want to enable and then click on the Next button.

Select Additional Tasks

Note

It is important to add Visual Studio Code to the system environment variable by clicking on the ‘Add to Path‘ checkbox.

8. Finally, you’re ready to install the Visual Studio Code on Windows 11. Just review all your selections, then click on the Install button to begin the installation.

Review the Installation Setup of VS Code

9. After the installation is successful, select the box for launching VS Code and click the Finish button.

It will take some time to install, so please wait until the installation is complete. After that, you’re ready to use Visual Studio Code. That’s it! This is how you can download and install VS Code on the Windows operating system.

How to Add Extension in Visual Studio Code

Extensions are add-ons that enable you to customize and enhance your experience in Visual Studio Code by adding new plugins. An extension can vary in complexity, but its primary purpose is to enhance your productivity. Extensions can include controls, samples, templates, tools, or other components that provide additional functionality to Visual Studio Code.

For example, if you want to use VS Code for Python, you’ll need to install the Python Extension. To do that, follow these steps to install extensions in Visual Studio Code:

1. Open Visual Studio Code.

2. Click on the Extensions icon or use the shortcut key Ctrl + Shift + X to open the marketplace.

3. Now, search for the extension you wish to install.

4. Select the extension and review its details, contributions, changelog, and more.

5. Finally, when you’re ready to install the extension, click on the Install button to initiate the installation.

6. After the installation is complete, reopen the Visual Studio Code to apply the changes.

Install Extensions on VS Code

If you wish to stop using an extension, you have two options: you can either disable it or uninstall it. Disabling an extension keeps it installed but unloaded. To disable an extension, locate it and click on Disable. If you decide to uninstall it, click Uninstall. After that, restart Visual Studio Code to unload a disabled extension.

VS Code Extensions you can Install

VS Code has a vast collection of extensions on the marketplace that you can use, and you can always install them from the Extension page in the application.

Here, we’ve compiled a list of useful extensions that you can install:

  • Code Runner: This extension helps you run code snippets or code files for programming languages like C, C++, Python, and Java.
  • Prettier: It is an opinionated code formatter that allows you to write more consistent and readable code.
  • Tabnine: It offers AI code completions, code chat, code generation, unit testing, documentation, and more for major programming languages, including JavaScript, Python, Java, TypeScript, C/C++, and more.
  • Code Spell Checker: This extension helps prevent coding spelling mistakes by checking your code for spelling errors and highlighting them for easy correction.
  • GitHub Copilot: Your AI pair programmer. Get code suggestions in real-time, right in your editor.

Besides these extensions, you can also add programming language support, including Python, C, C++, Java, TypeScript, JavaScript, HTML, CSS, Go, and more. However, Visual Studio Code is not a fully integrated development environment (IDE) like Visual Studio, which offers a more comprehensive set of tools for software development.

Visual Studio is a robust choice for complex software projects, providing features such as project management, comprehensive debugging, and integrated testing tools. It’s an excellent option for larger and more intricate software development tasks.

How to Write and Run a Program in Visual Studio Code

Once you have VS Code up and running, you’re ready to start writing and running your code.

Follow these steps to run your first code in the VS code:

1. Open the Visual Studio Code.

2. Click on the File tab in the top menu and select New File from the drop-down.

VS Code Project

3. Type the name of the file with a programming language extension.

Naming a New File with a Programming Language Extension

4. After typing the name, select the location where you want to save the file and type the file extension.

5. After that, click on the Create File button.

Create File on VS Code

6. After creating the file, paste the following HTML code into the code editor and save the file.

<!DOCTYPE html>
<html>
<head>
    <title>My Demo HTML Page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>This is a demo HTML file.</p>
</body>
</html>

7. Now to run the code, click on the Run and Debug button or press Ctrl + Shift + D.

Run Code on VS Code

Conclusion

That’s it—this is how you can install Visual Studio Code on Windows 11. It’s important not to confuse Visual Studio Code with Visual Studio. While VS Code is a source code editor, Visual Studio is a full-fledged Integrated Development Environment (IDE).

Visual Studio Code is a powerful code editor that can greatly improve your coding and development experience. As you become more familiar with it, you’ll uncover a wide array of features and extensions that can enhance your workflow, making your development tasks more efficient and enjoyable.

TAGGED:
Follow:
Aditya Dhanraj is a Web Developer by profession and Content Writer by passion. He loves to write about coding and programming. When he is not writing, he must be developing something!
Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *