dev/notes

Spot a mistake? Highlight any text in a post and click Report — it goes straight to the author.

beginner · Tooling · August 17, 2026 · 2 min read

How to Set Up VS Code for Web Development

Set up VS Code for web development with the right extensions, a tuned settings.json, and an integrated terminal. A practical editor setup guide.

Start from a clean baseline

A focused VS Code setup beats a wall of extensions. Start with a small set that pays off every day, then add more only when you feel a specific gap.

Step 1 — Install core extensions

Open the Extensions view (Cmd/Ctrl + Shift + X) and install:

ExtensionWhy
ESLintLints JavaScript/TypeScript as you type
PrettierFormats code on save
GitLensBlame, history, and diff context
ES7+ React/Redux snippetsFaster component scaffolding
Path IntellisenseAutocompletes import paths

Step 2 — Tune settings.json

Open it via Cmd/Ctrl + Shift + PPreferences: Open User Settings (JSON):

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.tabSize": 2,
  "editor.rulers": [100],
  "files.trimTrailingWhitespace": true,
  "terminal.integrated.defaultProfile.linux": "bash"
}

Format-on-save with Prettier is the single biggest consistency win — it removes an entire class of style arguments from code review.

Step 3 — Configure the integrated terminal

VS Code’s terminal (Ctrl + `` ) is a full shell. Point it at your default:

  1. Cmd/Ctrl + Shift + PTerminal: Select Default Profile.
  2. Choose your shell (bash, zsh, PowerShell).

Open a project from the CLI with code . and the terminal inherits that folder.

Step 4 — Set up Node debugging

Add this launch config in .vscode/launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Debug index.js",
      "program": "${workspaceFolder}/index.js"
    }
  ]
}

Set a breakpoint by clicking in the gutter, press F5, and step through with F10/F11.

Step 5 — Learn the shortcuts that matter

ShortcutAction
Cmd/Ctrl + PJump to any file
Cmd/Ctrl + Shift + PCommand palette
Cmd/Ctrl + /Toggle comment
Option/Alt + Up/DownMove line
Cmd/Ctrl + DSelect next occurrence

Troubleshooting

  • Formatting does nothing — confirm Prettier is the default formatter and the language has formatting enabled ("editor.formatOnSave": true).
  • Debugger can’t attach — check program points at the entry file relative to ${workspaceFolder}.
  • Extensions conflict — disable rather than uninstall, then bisect.

Summary

You now have a fast, opinionated editor: linting and formatting on save, a shell-ready terminal, and step-through Node debugging. Next: create a TypeScript project that takes full advantage of it.

Related posts

Comments

One comment per thread every 30 minutes · edits are unlimited.