Programming Fundamentals
Visual Studio Code Installation
Installing Visual Studio Code and Configuring Extensions
Introduction:
In this guide, we will walk you through the process of installing Visual Studio Code, a
popular code editor used by programmers and developers worldwide. We'll also help you
configure some essential extensions to enhance your coding experience and show you how
to run your code in the terminal.
Installing Visual Studio Code:
1. Visit the official Visual Studio Code website at [Link]
2. Click on the "Download for Windows," "Download for macOS," or "Download for
Linux" button, depending on your operating system.
Programming Fundamentals
Visual Studio Code Installation
3. Once the download is complete, open the installer file and follow the on-screen
instructions to install Visual Studio Code on your computer.
4. After installation, launch Visual Studio Code by searching for it in your applications
or using the shortcut created on your desktop.
Programming Fundamentals
Visual Studio Code Installation
Configuring Visual Studio Code:
Upon launching Visual Studio Code, you can customize the editor to suit your preferences.
Here are some basic settings you may want to adjust:
● Theme: Click on the gear icon in the bottom left corner and select "Color
Theme" to choose a theme that suits your style.
● Font Size: Adjust the font size by clicking on the gear icon, selecting
"Settings," and searching for "Font Size."
● Tab Size: Change the tab size (e.g., 2 or 4 spaces) by searching for "Tab
Size" in the settings.
Programming Fundamentals
Visual Studio Code Installation
Installing Extensions:
Visual Studio Code supports a wide range of extensions that enhance its functionality. For
this course, we recommend installing the following extensions:
1. Code Runner
Code Runner allows you to run code snippets or entire files with a simple shortcut. To
install it:
Programming Fundamentals
Visual Studio Code Installation
● Click on the square icon in the left sidebar (Extensions).
● Search for "Code Runner."
● Click the "Install" button next to the Code Runner extension.
2. C++ Intellisense
C++ Intellisense provides intelligent code suggestions, auto-completion, and error
checking for C++ code. To install it:
● Click on the square icon in the left sidebar (Extensions).
● Search for "C++ Intellisense."
● Click the "Install" button next to the C++ Intellisense extension.
3. C/C++ Extension Pack
The C/C++ Extension Pack includes various extensions that are valuable for C and C++
development. To install it:
● Click on the square icon in the left sidebar (Extensions).
● Search for "C/C++ Extension Pack."
● Click the "Install" button next to the C/C++ Extension Pack.
Running Code in the Terminal:
Once you've installed the necessary extensions, you can run your code in the terminal
directly from Visual Studio Code.
1. Open the file you want to run.
2. Make sure the code is in the appropriate language (e.g., C++ for C++ code).
3. Right-click anywhere in the editor and select "Run Code" from the context
menu.
Programming Fundamentals
Visual Studio Code Installation
4. The output of your code will be displayed in the terminal panel at the bottom
of the screen.
Note:
If you are unable to write anything in your terminal then follow this step as well.
● Click on the gear icon, select "Settings," and search for "Terminal". Then
tick the box with Code-runner: Run in Terminal
Programming Fundamentals
Visual Studio Code Installation
Conclusion:
Congratulations! You have successfully installed Visual Studio Code and configured
essential extensions. You now have the tools you need to write, edit, and run your code
efficiently. Remember to explore additional extensions and customize your development
environment further as you become more comfortable with Visual Studio Code. Happy
coding!