Wednesday, 4 November 2026

Getting Started with Claude Code in VS Code: A Step-by-Step Setup Guide

Introduction

You can have Claude Code running inside VS Code in about 10 minutes: install one extension, sign in, and run a couple of commands.

Claude Code is Anthropic's AI coding assistant. Unlike a chat window in the browser, it works directly on the files in your project. It can read your codebase, explain logic, propose edits as side-by-side diffs, and run commands — always asking for your approval first, unless you tell it otherwise.

Running it inside VS Code means you never leave your editor. You select code, ask a question, and review the suggested changes right next to your files. In this note I walk through the full setup on Windows, step by step, the same way I set it up on my own machine.

Prerequisites

Before you start, make sure you have these four things ready.

Requirement Details
VS Code Version 1.94.0 or later. Check under Help > About.
Claude account Any paid plan (Pro, Max, Team or Enterprise) or a Claude Console account. No API key is needed.
Windows Windows 10 (1903+) or Windows 11. Use a normal 64-bit PowerShell window; admin rights are not required.
Git for Windows (optional) Recommended. It gives Claude Code Git Bash for running shell commands. Without it, Claude Code falls back to PowerShell.

Mac and Linux work too. I note the different commands where they apply.

Step 1: Install the Claude Code extension

The extension is published by Anthropic on the VS Code Marketplace.

  1. Open VS Code.
  2. Press Ctrl+Shift+X (Mac: Cmd+Shift+X) to open the Extensions view.
  3. Search for Claude Code.
  4. Make sure the publisher is Daniel Carvalho Liedke, then click Install.
  5. If VS Code asks whether you trust the publisher, choose Trust Publisher & Install.

Tip: If the extension does not show up after installing, open the Command Palette (Ctrl+Shift+P) and run Developer: Reload Window.

Step 2: Open the Claude panel and sign in

Claude Code is marked everywhere in VS Code by a small orange Spark icon. Open your project folder first (File > Open Folder), then open the panel in any of these ways:

  • Click the Spark icon in the top-right corner of the editor (it appears only when a file is open).
  • Click the Spark icon in the left Activity Bar to see your sessions.
  • Click ✻ Claude Code in the Status Bar at the bottom-right.
  • Press Ctrl+Shift+P, type Claude Code, and pick Open in New Tab.

The first time the panel opens, you see a sign-in screen. Click Sign in, choose your Claude.ai subscription, and approve access in the browser window that opens. Once you are back in VS Code, a short Learn Claude Code checklist appears. It is worth a quick look.

Step 3: Install the Claude Code CLI

The extension already bundles its own copy of Claude Code for the chat panel. But it does not add the claude command to your terminal. To use claude in the integrated terminal (and unlock CLI-only features like claude mcp add), install the standalone CLI once.

Open the VS Code terminal with Ctrl+` and run the command for your system.

Windows (PowerShell) — recommended:

irm https://claude.ai/install.ps1 | iex

Windows (Command Prompt):

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Windows (WinGet) — alternative, but it does not auto-update:

winget install Anthropic.ClaudeCode

macOS / Linux / WSL:

curl -fsSL https://claude.ai/install.sh | bash

Watch out: irm works only in PowerShell. If your prompt starts with PS C:\, you are in PowerShell; a plain C:\ means Command Prompt. When the install finishes, close and reopen the terminal so the updated PATH is picked up.

Step 4: Verify the install and connect to your project

In a fresh terminal, run these commands one by one.

1. Check the version — you should see a version number:

claude --version

2. Go to your project folder and start Claude Code:

cd C:\Projects\MyProject
claude

If you are not signed in yet, the CLI opens your browser to log in. When you start claude from VS Code's integrated terminal, it connects to the editor automatically, so diffs open in VS Code's diff viewer and Claude can see the code you select.

3. Using an external terminal? Run this inside Claude Code to link it to VS Code:

/ide

4. Create a project memory file:

/init

/init scans your project and writes a CLAUDE.md file. Claude reads this file at the start of every session, so it is the place to note your coding standards, naming conventions and folder layout. Both the extension and the CLI use it.

5. Check everything is healthy:

/status

This shows your Claude Code version, signed-in account, current model and any connected MCP servers.

Step 5: Send your first prompt

Start small. Open a file, select a few lines, and type in the Claude panel:

Explain what this method does and suggest any improvements.

Claude sees your selected code automatically. A few features make day-to-day work much smoother:

Feature How to use it
@-mentions Type @ plus a file or folder name, e.g. @SalesHelper.cs or @src/. Press Alt+K to insert the current file and selected lines.
Permission modes Click the mode at the bottom of the prompt box. Manual asks before every edit, Plan proposes a plan first, Edit automatically applies edits without asking. Start with Manual or Plan.
Plan mode Type /plan followed by your task. Claude writes a plan you can comment on before any file changes.
Review diffs Edits open as side-by-side diffs. Accept or reject each change, or the whole file.
Checkpoints Hover a message and choose Rewind code to here to undo Claude's edits from that point.
Switch focus Ctrl+Esc jumps between the editor and the Claude prompt box.
New conversation tab Ctrl+Shift+Esc opens a parallel conversation in its own tab.

For longer changes, my habit is: ask in Plan mode first, review the plan, then let Claude implement it in Manual mode so I approve each diff.

Bonus: Using it alongside Visual Studio for D365FO

D365 Finance & Operations development happens in Visual Studio, not VS Code, and there is no Claude Code extension for Visual Studio itself. The setup I use is to run both editors on the same model folder:

  1. Keep building, syncing and debugging in Visual Studio as usual.
  2. In VS Code, open your custom model folder, for example C:\AOSService\PackagesLocalDirectory\YourModel.
  3. Ask Claude Code to read, explain or edit the X++ XML files there (classes, tables, forms).
  4. Switch back to Visual Studio, refresh, and build to compile and test the changes.

You can also run claude straight from Visual Studio's terminal (View > Terminal) once the CLI from Step 3 is installed.

A few tips that made a big difference for me:

  • Put your naming prefix, model name and best-practice rules in CLAUDE.md, so every generated object follows them.
  • Point Claude at a similar existing object as a pattern, e.g. "build a new inquiry form modeled on @MyExistingReport".
  • Always compile in Visual Studio. Claude cannot see the full AOT, so a build is your real check that every referenced field and method exists.

Troubleshooting

Problem Fix
claude is not recognized in the terminal The extension does not add claude to PATH. Install the CLI (Step 3), then close and reopen the terminal.
'irm' is not recognized You ran the PowerShell command in Command Prompt. Use PowerShell, or the CMD command from Step 3.
Spark icon is missing Open a file (a folder alone is not enough), check VS Code is 1.94+, and run Developer: Reload Window.
Extension does nothing in a folder VS Code may be in Restricted Mode. Trust the workspace when prompted.
Asked to sign in again Run /login in the panel, or reload the window.
Claude never responds Check your internet connection, start a new conversation, or run claude in the terminal to see detailed errors.

To update later, run claude update (native installer) or winget upgrade Anthropic.ClaudeCode (WinGet). The extension updates itself through VS Code.

Wrapping up

That is the whole setup: one extension, one sign-in, one install command, and /init to give Claude context about your project. From here you can explore MCP servers (/mcp) to connect external tools, and fine-tune permissions in ~/.claude/settings.json, which the extension and CLI share.

Getting Started with Claude Code in VS Code: A Step-by-Step Setup Guide

Introduction You can have Claude Code running inside VS Code in about 10 minutes: install one extension, sign in, and run a couple of co...