Skip to main content

🛠️ Installing VS Code & Essential Extensions

A writer could scribble a novel on napkins — or use a professional tool with spell-check, organization, and formatting built in. Visual Studio Code is that professional tool, but for programmers. In this lesson you'll install it, learn your way around, tune a few settings, and add the extensions that turn a plain editor into a coding powerhouse.

Week 1 · Day 1 (Monday: Course Introduction & Development Environment) · Lecture 2

🎯 Learning Objectives

By the end of this lesson, you will be able to:

  • Download and install VS Code on Windows, macOS, or Linux
  • Name the main regions of the VS Code interface and what each does
  • Configure the core editor settings professionals use for web work
  • Install and explain five must-have extensions (ESLint, Prettier, Live Server, and more)
  • Use essential keyboard shortcuts to move faster than a mouse alone
  • Create a project and preview a live-reloading web page

Estimated Time: 50 minutes

Practice: Set up VS Code end to end and preview your first HTML page with Live Server.

In This Lesson

Why VS Code?

A code editor is where you'll spend more time than anywhere else in this course. You could write code in a plain text editor like Notepad, but that's like cooking a five-course meal with only a spoon. VS Code, made by Microsoft and free for everyone, has become the industry-standard editor — surveys consistently show a large majority of professional developers use it.

Here's what you get out of the box, and why it matters:

  • Free & open source — no license to buy, and a huge community keeps improving it
  • Cross-platform — identical on Windows, macOS, and Linux, so this lesson works for everyone
  • Lightweight yet powerful — starts fast like a simple editor, but scales to full projects
  • A massive extension marketplace — think of it as an app store that adds new abilities on demand
graph TD A[VS Code] --> B[IntelliSense
autocomplete + error hints] A --> C[Integrated Terminal
run commands without leaving] A --> D[Git Integration
see changes visually] A --> E[Extensions
add languages & tools] A --> F[Debugging
breakpoints & inspection]

Don't worry about mastering every feature today. You'll pick them up naturally over the coming weeks — right now we just need it installed and comfortable.

Installing VS Code

The download page detects your operating system automatically, so this is quick.

Step 1 — Download

  1. Visit code.visualstudio.com
  2. Click the big download button (it already matches your OS)
  3. Wait for the installer to finish downloading

Step 2 — Install for your OS

🪟 Windows

  1. Run the downloaded .exe file
  2. Accept the license agreement
  3. Keep the default installation location
  4. On the "Select Additional Tasks" screen, check these boxes — they save real headaches later:
    • ✓ Add "Open with Code" to the file context menu
    • ✓ Add "Open with Code" to the directory context menu
    • Add to PATH (this lets you type code . in any terminal)
  5. Click Install, then launch VS Code when it finishes

🍎 macOS

  1. Open the downloaded .zip; it expands to Visual Studio Code.app
  2. Drag that app into your Applications folder
  3. Launch it from Applications (right-click → Open the first time to bypass the security prompt)
  4. To enable the code terminal command: open the Command Palette with Cmd+Shift+P, type shell command, and choose "Install 'code' command in PATH"

🐧 Linux (Ubuntu / Debian)

  1. Download the .deb package from the site
  2. Install it from a terminal:
sudo apt install ./<file>.deb
# If it complains about dependencies:
sudo apt-get install -f
# Launch it:
code

✅ Verify the install

Open a terminal and run code --version. If you see a version number, VS Code is installed and on your PATH. That PATH step is what lets you open any folder in the editor by typing code . — a habit you'll use constantly.

Getting Familiar With the Interface

Opening VS Code for the first time is like walking into a new workshop — lots of stations, but each has a clear job. There are five regions worth knowing by name.

VS Code layout: activity bar, side bar, editor area, panel, and status bar Activity Bar Side Bar (file explorer) Editor Area where you write code Panel — Terminal / Problems / Output Status Bar — Git branch, language mode, errors
The five regions of VS Code. You'll mostly live in the Editor Area, dip into the Side Bar to open files, and pop the Panel open for the terminal.
  • Activity Bar (far left): big icons that switch what the Side Bar shows — Explorer, Search, Source Control, Run & Debug, Extensions
  • Side Bar: context for the selected activity, most often your project's file tree
  • Editor Area: where your code lives; open several files as tabs, or split the view side by side
  • Panel (bottom): the integrated Terminal, Problems list, and Output — toggle it with Ctrl+`
  • Status Bar (very bottom): your current Git branch, the file's language, and any error/warning counts at a glance

Essential Settings

Before installing extensions, let's adjust a few settings — the equivalent of tuning your seat and mirrors before you drive. You can edit settings visually (Ctrl+, on Windows/Linux, Cmd+, on Mac), but it's faster to edit the JSON directly.

Open the Command Palette (Ctrl/Cmd+Shift+P), type Open User Settings (JSON), and paste this in:

{
  "editor.fontSize": 14,
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "editor.formatOnSave": true,
  "editor.minimap.enabled": true,
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": true,
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,
  "workbench.startupEditor": "none"
}
SettingWhat it does
editor.fontSizeComfortable text size for long sessions — bump it up if you squint
editor.tabSizeTwo-space indentation, the standard for JavaScript, React, HTML, and CSS
editor.wordWrapWraps long lines so you never scroll horizontally
editor.formatOnSaveAuto-formats your code every save (pairs with Prettier below)
editor.bracketPairColorizationColors matching brackets so you can spot mismatches instantly
files.autoSaveSaves shortly after you stop typing — you'll never lose work again

📖 Why edit settings as JSON?

Every VS Code setting is ultimately a line in this JSON file. Editing it directly is faster once you know the key names, and it's easy to copy your setup to a new machine — just copy the file. The visual settings UI writes to the exact same place.

Essential Extensions

Extensions are the power tools of your workshop. Install them from the Extensions view — click the icon in the Activity Bar or press Ctrl+Shift+X, search the name, and click Install. Here are the five that matter most for web work.

graph TD A[Essential Extensions] --> B[ESLint
catches bugs as you type] A --> C[Prettier
auto-formats your code] A --> D[Live Server
instant browser preview] A --> E[GitLens
supercharged Git history] A --> F[Auto Rename Tag
keeps HTML tags in sync]

1. ESLint

What it does: a spell-checker for your JavaScript. It underlines problems — an unused variable, a likely typo, a bug-prone pattern — before you ever run the code. As a beginner, this feedback loop is gold; the editor teaches you good habits in real time.

2. Prettier — Code Formatter

What it does: automatically formats your code so indentation, spacing, and quotes are consistent — no more fiddling by hand. Combined with the formatOnSave setting above, your code tidies itself every time you save. Set it as your default formatter when prompted.

3. Live Server

What it does: spins up a tiny local web server and auto-refreshes your browser whenever you save. Right-click any HTML file and choose "Open with Live Server." Edit, save, and watch the page update instantly — you'll use this every single day in Phase 1.

4. GitLens

What it does: layers rich information on top of Git. Hover over any line to see who last changed it and why. It won't fully click until after the next lesson (Git & GitHub), but install it now so it's ready.

5. Auto Rename Tag

What it does: when you rename an HTML opening tag, it renames the matching closing tag automatically. A small thing that prevents a surprising number of "why is my page broken?" moments.

✅ Nice-to-haves (optional)

Once you're comfortable, explore Material Icon Theme (clearer file icons), Path Intellisense (autocompletes file paths), and a color theme you enjoy looking at. A workspace you like is a workspace you'll return to.

Keyboard Shortcuts

Learning shortcuts is like learning to touch-type — awkward at first, then a huge speed boost. Don't memorize all of these at once; pick two or three and use them until they're automatic, then add more.

ActionWindows / LinuxmacOS
Command Palette (do anything)Ctrl+Shift+PCmd+Shift+P
Quick-open a file by nameCtrl+PCmd+P
Toggle the terminalCtrl+`Cmd+`
Save the current fileCtrl+SCmd+S
Find in the current fileCtrl+FCmd+F
Add a second cursorAlt+ClickOption+Click
Comment / uncomment a lineCtrl+/Cmd+/
💡 The one to learn first: the Command Palette (Ctrl/Cmd+Shift+P). Anything VS Code can do is in there — just start typing what you want. It's your safety net for every feature you haven't memorized yet.

Your First Project

Let's prove the setup works by making a page and previewing it live.

  1. Create a new folder called my-first-project somewhere sensible
  2. In VS Code: File → Open Folder, and select it (or run code my-first-project from a terminal)
  3. In the Explorer, click New File and name it index.html
  4. Type this in (yes — type it, don't paste):
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First VS Code Project</title>
</head>
<body>
    <h1>Hello, VS Code!</h1>
    <p>I'm ready to start coding.</p>
</body>
</html>

Preview it with Live Server

  1. Right-click index.html and choose "Open with Live Server"
  2. Your browser opens to something like http://127.0.0.1:5500
  3. Change the <h1> text, hit Save, and watch the browser refresh on its own

What you should see

Hello, VS Code!
I'm ready to start coding.

Edit the text, save, and the browser updates instantly. That instant feedback loop is the heart of frontend development.

Practice & Quiz

🏋️ Exercise: Set up and prove it

Goal: Get a fully working editor and a live-previewing page. Complete each step:

  1. Install VS Code and verify with code --version
  2. Paste in the recommended settings JSON
  3. Install ESLint, Prettier, Live Server, GitLens, and Auto Rename Tag
  4. Create my-first-project/index.html and open it with Live Server
  5. Change some text, save, and confirm the browser auto-refreshes
  6. Practice three shortcuts: Command Palette, Quick Open, and Toggle Terminal
💡 Hint

If code --version says "command not found," you missed the PATH step. On Windows, re-run the installer and check "Add to PATH." On Mac, use the Command Palette's "Install 'code' command in PATH."

✅ Solution / checklist

You're done when all of these are true:

[x] code --version prints a version number
[x] Settings JSON saved (formatOnSave + autoSave on)
[x] 5 extensions show "Installed" in the Extensions view
[x] index.html opens in the browser via Live Server
[x] Editing + saving refreshes the page automatically
[x] You can open the Command Palette from memory

🎯 Quick Quiz

Question 1: Which extension gives you a browser preview that auto-refreshes when you save?

Question 2: During Windows installation, why does it matter to check "Add to PATH"?

Question 3: What's the fastest way to reach almost any VS Code feature?

Best Practices & Troubleshooting

✅ Do

  • Open a whole folder as your project, not individual files — VS Code works best that way
  • Turn on Format on Save and let Prettier keep your code tidy
  • Learn a couple of shortcuts at a time until they're automatic
  • Keep your extension list lean — install what you use, not everything

❌ Don't

  • Ignore the squiggly underlines from ESLint — they're teaching you
  • Install dozens of extensions on day one; it slows the editor and overwhelms you
  • Fight the auto-formatter by hand — configure it once and trust it

⚠️ Common hiccups

  • Extension not working? Run "Developer: Reload Window" from the Command Palette, and check it's enabled for your workspace.
  • Live Server won't open? Port 5500 may be in use — change it in Live Server settings, and make sure an HTML file is open.
  • Can't find a setting? Open the Command Palette and type "settings"; toggle between the UI and JSON views with the icon in the top-right.

Summary

🎉 Key Takeaways

  • VS Code is the free, cross-platform, industry-standard editor you'll use all course long
  • The interface has five regions: Activity Bar, Side Bar, Editor, Panel, and Status Bar
  • A few settings — Format on Save, Auto Save, 2-space tabs — make everyday coding smoother
  • Five extensions do the heavy lifting: ESLint, Prettier, Live Server, GitLens, Auto Rename Tag
  • The Command Palette plus a handful of shortcuts will make you noticeably faster

📚 Additional Resources

🚀 What's Next?

Your editor is ready — now let's make sure your work is safe and shareable. The next lesson sets up Git and GitHub, the version-control system that acts like a time machine for your code and a home for your growing portfolio.

🎉 Your workshop is open!

You've installed and tuned the tool you'll use every day for the next 16 weeks. That's real progress.