How to Use VS Code: The Beginner's Guide (First File, First Run, and the Extensions That Matter)

CodexFuse Team · 2026-10-28T09:08:56.742Z · 16 min read

Learning how to use VS Code takes about an hour: install the free editor, open your first folder, write and run your first program, and add the extensions beginners actually need.

Learning how to use VS Code takes about an hour, and most of that hour is writing your first real program — not configuring the editor. Visual Studio Code is Microsoft's free code editor for Windows, macOS, and Linux, and it is the editor most new developers meet first: it opens fast, it works in almost every programming language, and you do not need an account to use it. This guide walks you through the whole first session — install, first folder, first file, first run, the shortcuts that matter, and the extensions worth installing — and finishes with the Copilot and AI line, so you know what is free and what is paid before you sign in to anything.

One confusion to clear up before you start: VS Code is not the same program as Visual Studio, and mixing the two up is the most common beginner mistake — the difference is covered near the end of this guide. If you already write code with an AI agent, read this guide alongside our guide on how to use Claude Code: the agent writes the code, and VS Code is where you read it, run it, and fix it.

What is VS Code?

Visual Studio Code — VS Code for short — is a free code editor made by Microsoft. It is a streamlined editor, not a full IDE: it gives you editing, debugging, task running, and version control in one window, and leaves heavier workflows to fuller-featured IDEs. It runs on Windows, macOS, and Linux, and it is free for private or commercial use.

What makes VS Code different from a plain text editor is what ships inside it: syntax highlighting and IntelliSense (smart code suggestions) for dozens of languages, a built-in terminal, a debugger, built-in Git, and an extensions marketplace that adds support for practically any language or tool. You do not need an account for any of that — the core editor, terminal, debugger, source control, and extensions all work without signing in. Signing in only matters for the AI features, which are covered later in this guide.

How do I use VS Code for the first time?

Using VS Code for the first time is a seven-step job: install it, open a folder, create a file, write a few lines, run them, learn the shortcuts, and add one or two extensions. Do it in that order and you will have a working program in your first session instead of a configured-but-empty editor.

  1. Install VS Code from the official site for your operating system.
  2. Open a folder — this folder becomes your project workspace.
  3. Create your first file and save it with the right extension, such as app.js or hello.py.
  4. Write a few lines of code and watch IntelliSense suggest completions as you type.
  5. Run the code from the built-in terminal.
  6. Learn five shortcuts — Command Palette, Quick Open, terminal, save, and multi-cursor.
  7. Install one extension for the language you are learning, and stop there until you need more.

How to install VS Code on Windows, Mac, and Linux

Download the installer from the official VS Code site and pick the build for your system. On Windows, run the User Setup installer and follow the prompts; the installer adds code to your PATH, so you can open any folder from a terminal later with code .. On macOS, drag the downloaded app into your Applications folder. On Linux, install the .deb or .rpm package for your distribution, or use your package manager.

Stable releases ship weekly and update automatically, so the version you download today is never far behind. There is also an Insiders build — a nightly preview that runs side by side with Stable — but beginners should ignore it until they have a reason to preview upcoming features. If you are on a work or school machine, check whether your organization controls installation or AI features before you start.

How to open your first folder and file in VS Code

In VS Code, a folder that holds your project files is called a workspace, and opening a folder is how every session starts. Go to File > Open Folder, pick or create a folder for your project, and the folder name and its files appear in the Explorer view on the left. The editor, terminal, source control, debugger, and AI features all share that same project context, which is why opening the folder — not just a single file — is the right first move.

If a Workspace Trust dialog appears, read it before you click. Only trust code from sources you know; unfamiliar code can be browsed safely in Restricted Mode, where extensions and tasks are limited. To create your first file, hover over the folder in the Explorer and click the New File icon, or press Ctrl+N (Cmd+N on Mac) and save with a real extension — the extension is what tells VS Code which language you are writing. Save a file as app.js and you get JavaScript support; save it as hello.py and you get Python support.

How to use VS Code to write and run your first code

The fastest honest first run is the JavaScript "Hello World" from Microsoft's own Node.js tutorial. It takes four commands in the built-in terminal, and it proves the whole loop — write, save, run, see output — in under a minute. First, make sure Node.js is installed on your computer; VS Code edits JavaScript, it does not run it by itself.

  1. Create an empty folder called hello, open it in VS Code, and create a file named app.js.
  2. Type these two lines into app.js and save with Ctrl+S (Cmd+S on Mac):
    var msg = 'Hello, VS Code!';
    console.log(msg);
  3. Open the integrated terminal with Ctrl+` (the backtick key) or View > Terminal.
  4. Type node app.js and press Enter. You should see Hello, VS Code! printed in the terminal.

Notice what happened while you typed: as soon as you wrote console., VS Code offered IntelliSense completions, and it knew msg was a string from the way you initialized it. That is the editor doing its real job. If you would rather start in Python, the same loop applies: create hello.py, write print("Hello, VS Code!"), open the terminal, and run python hello.py. The language changes; the workflow does not.

What do the parts of the VS Code screen do?

VS Code packs a lot into one window, but it is really five areas you need to know. Learn these and the rest of the interface stops feeling crowded.

PartWhere it isWhat it does
Activity BarFar left, vertical iconsSwitches between views: Explorer, Search, Source Control, Run and Debug, Extensions.
Side BarLeft, next to the Activity BarShows the content of the selected view — your file tree, search results, or Git changes.
EditorCenterWhere you write code. Open several files in tabs; split the editor to see two files side by side.
Panel / TerminalBottomThe integrated terminal, problems list, and output. Run commands without leaving the editor.
Status BarVery bottomShows the current branch, language, line and column, errors, and the Copilot sign-in state.
Command PaletteOpens over the top (Ctrl+Shift+P)Runs any command by name — the fastest way to do anything you cannot find in a menu.

Two views deserve a special mention for beginners. The Outline view, below the Explorer, shows a clickable tree of the headings, classes, and functions in your current file — in a Markdown file it becomes a table of contents. And Markdown Preview (Ctrl+K, then V) renders a .md file side by side with your text, updating as you type, which is the easiest way to write a README.

VS Code shortcuts every beginner should learn

Shortcuts are the difference between using VS Code and fighting it. Learn these ten first — they are the ones working developers reach for all day, and most of them work in other editors too.

What it doesWindows / LinuxmacOS
Open the Command PaletteCtrl+Shift+PCmd+Shift+P
Quick Open a file by nameCtrl+PCmd+P
Save the current fileCtrl+SCmd+S
Open the integrated terminalCtrl+`Ctrl+`
Find in the current fileCtrl+FCmd+F
Select the next occurrence of a wordCtrl+DCmd+D
Move a line up or downAlt+Up / DownOption+Up / Down
Comment or uncomment a lineCtrl+/Cmd+/
Open the Extensions viewCtrl+Shift+XCmd+Shift+X
Zen Mode (distraction-free)Ctrl+K, then ZCmd+K, then Z

Two editing tricks are worth learning the same week. Multi-cursor editing — hold Alt (Option on Mac) and click in several places — lets you edit many lines at once, and Ctrl+D selects the next occurrence of a word so you can rename it everywhere in one pass. And when you type a quote or bracket around selected text, VS Code wraps the selection automatically instead of replacing it.

VS Code extensions for beginners

Extensions add language support, formatting, and tools on top of the built-in editor, and you install them from the Marketplace inside VS Code (Ctrl+Shift+X). Install one at a time, use it for a week, and only then add the next one — a dozen extensions installed on day one is how beginners end up fighting their own setup.

ExtensionWhat it doesInstall it if you…
PrettierFormats your code automatically on save.Write JavaScript, TypeScript, HTML, or CSS.
Live ServerServes your HTML page locally and reloads it on save.Are learning web pages and want instant previews.
Python (by Microsoft)Python language support, linting, and debugging.Are learning Python — this one is effectively required.
ESLintFlags JavaScript mistakes and style problems as you type.Write JavaScript or TypeScript seriously.
GitLensShows who changed each line, when, and why, right in the editor.Work on shared code and want Git history without leaving the editor.
Code Spell CheckerUnderlines misspelled words in code and comments.Want typos caught before they reach a commit or a customer.

Be careful with extensions the same way you are careful with downloads: they run code on your machine and can carry their own settings that override your project. Install from the official Marketplace, check the publisher name, and skip anything that asks for more access than its job needs.

How to run and debug code in VS Code

Running code means handing it to a runtime — Node.js for JavaScript, Python for Python, a browser for HTML — and VS Code's job is to make that handoff painless. The integrated terminal is the simplest path: open it, type the run command, and read the output in the same window. For a web page, the Live Server extension does the same job with a live browser preview.

Debugging is where VS Code earns its keep. Click in the margin next to a line number to set a breakpoint, press F5 (or open the Run and Debug view) to start, and the program pauses at your breakpoint so you can inspect variables, step through line by line, and watch values change. Set one breakpoint in your "Hello World" program and step through it once — that single exercise teaches more about debugging than any article can.

How to use Git in VS Code

VS Code has Git built in, so the basic version-control loop never leaves the editor. Open the Source Control view (Ctrl+Shift+G), stage the files you changed, type a commit message in the box at the top, and commit. The Status Bar shows your current branch, and clicking it lets you switch branches or create a new one without touching a terminal.

The built-in Git tools also handle the messy parts beginners dread. When a merge conflict appears, VS Code shows the conflicting sections side by side so you can pick which side to keep, line by line. The Source Control view lists your commit history, so you can see what changed and when before you push. If you are new to Git itself, start with our guide on how to use GitHub — it covers creating an account, your first repository, and your first pull request, and everything it teaches slots straight into the Source Control view here.

Copilot and AI in VS Code: what is free and what is paid

VS Code now ships with AI features built in, and GitHub Copilot is the recommended starting point: inline suggestions as you type, a chat panel for questions and edits, and an agent mode that can plan a task, edit files, and run commands. You do not need a Copilot subscription to use AI in VS Code at all — you can bring your own model key, use another provider's agent, or run a local model such as Ollama — but Copilot is the path most beginners take, and its free tier is genuinely usable.

Copilot planPriceWhat you get
Free$02,000 code completions and 50 chat or agent requests per month, with automatic model selection.
Pro$10 per monthUnlimited completions, model choice, and a monthly allowance of AI credits for chat, agent mode, and code review.

The free allowance resets on the 1st of each month and does not carry over, so treat it as a trial budget: learn the workflow on Free, and pay for Pro only when the limits start getting in your way. Two honest warnings: the free credit pool runs out fast if you lean on chat and agent mode every day, and AI suggestions are guesses — read every suggestion before you accept it, because the editor will happily insert confident-looking code that does not do what you asked. If you want to go further with AI coding, our guides on how to use Google AI Studio and how to use Google Antigravity cover the browser workspace and the agent-first desktop platform. And if you would rather keep AI out of your editor entirely, set chat.disableAIFeatures in Settings — VS Code respects that choice, runs no AI background processes, and sends no data to the Copilot backend while the features are off.

VS Code vs Visual Studio: what is the difference?

VS Code and Visual Studio share a name and a maker, and almost nothing else. Microsoft's own FAQ puts it plainly: Visual Studio Code is a streamlined code editor built for a quick code-build-debug cycle, while Visual Studio IDE is the fuller-featured IDE for more complex workflows. Here is the practical difference.

Visual Studio CodeVisual Studio IDE
What it isA lightweight, fast code editorA full integrated development environment
PriceFree for private or commercial useFree Community edition; paid Professional and Enterprise editions
Runs onWindows, macOS, LinuxWindows and macOS only
Best forWeb, scripting, Python, JavaScript, and most day-to-day codingLarge .NET, C++, and enterprise projects with heavy tooling
How it growsExtensions from the MarketplaceBuilt-in workloads installed up front

Rule of thumb: if you are learning to code, building websites, or writing Python and JavaScript, VS Code is the right pick. If a course or a job specifically says "Visual Studio," that is the IDE — install that one instead. A related choice is Cursor, an AI-first editor built on VS Code; our guide on how to use Cursor AI explains when the agent-first approach is worth switching for, and when plain VS Code is enough.

When to look beyond the desktop editor

Most beginners should stay on the desktop app, but two situations call for something else. If you are on a borrowed computer, a Chromebook, or a machine where you cannot install software, VS Code for the Web runs the editor in a browser at vscode.dev — lighter than the desktop app, but fine for quick edits. And if your code needs to run on a remote server, VS Code can connect the desktop editor to that machine, so you edit locally and the code runs remotely.

Windows users working with Linux tools should also know about WSL2 (Windows Subsystem for Linux): it lets you run a real Linux environment inside Windows, and VS Code connects to it with a single extension. Treat WSL2 as a note for later, not a day-one task — install the editor, finish your first program, and come back to remote workflows once the basics feel easy.

Beginner mistakes to skip

Most VS Code frustration comes from five avoidable habits. Skip them and your first month will be much smoother.

  • Opening single files instead of folders. Open the folder and you get the file tree, terminal, Git, and debugger in one context; open a lone file and half the editor is missing.
  • Installing twenty extensions on day one. Start with one language extension and Prettier. Add more only when a real task demands them.
  • Ignoring the Command Palette. If you cannot find a feature, press Ctrl+Shift+P and type its name — it is faster than hunting through menus.
  • Trusting every AI suggestion. Copilot completes code; it does not understand your project. Read each suggestion before you accept it.
  • Skipping the terminal. The integrated terminal is not an advanced feature — it is how you run your code, and learning it in week one saves months of confusion.

Sources

Frequently Asked Questions

Is VS Code really free?

Yes. VS Code is free for private or commercial use — there is no paid version of the editor itself. The only thing that costs money is the AI layer: GitHub Copilot has a free tier with monthly limits and paid plans from $10 per month, but the editor, terminal, debugger, Git, and extensions are free without any subscription.

Do I need a Microsoft or GitHub account to use VS Code?

No. You do not need an account to install VS Code or use its core features — editing, the terminal, debugging, source control, and extensions all work without signing in. An account only matters for the AI features: signing in with GitHub connects VS Code to your Copilot plan, and you can also use AI without a Copilot subscription by bringing your own model key or running a local model.

What is the difference between VS Code and Visual Studio?

VS Code is a streamlined, lightweight code editor built for a quick code-build-debug cycle, and it runs on Windows, macOS, and Linux. Visual Studio is a full IDE for larger, more complex projects — mostly .NET and C++ — and it runs on Windows and macOS. Beginners learning web development, Python, or JavaScript should start with VS Code.

How do I run code in VS Code?

Open the integrated terminal with Ctrl+` and type the run command for your language — node app.js for JavaScript, python hello.py for Python. VS Code edits code; the language runtime actually runs it, so install Node.js or Python first. For a web page, the Live Server extension serves it in your browser and reloads it every time you save.

Which extensions should a beginner install first?

Start with one language extension — Python by Microsoft if you write Python — plus Prettier for automatic formatting. Add Live Server if you build web pages, ESLint if you write JavaScript, and GitLens once you work on shared code. Install them one at a time and give each a week before adding the next.