How to Use Claude Code Inside VS Code
Install the VS Code extension so Claude Code edits appear as inline diffs in the editor instead of only in the terminal.
Claude Code works in the terminal, but pairing it with the VS Code extension shows proposed edits as native diffs right in the editor, with your current file and selection passed in as context. This guide installs the extension and runs a change from inside VS Code.
What you need
- VS Code installed
- Claude Code CLI installed and signed in
- A project open in VS Code
- About 6 minutes
Step 1: Install the extension
Open the Extensions panel, search for Claude Code, and install the official extension from Anthropic. It detects the CLI you already installed.
Step 2: Open the Claude panel
After installing, open the Claude Code panel from the sidebar or the command palette. Run the Open Claude Code command to dock a session next to your files.
> Claude Code: OpenStep 3: Ask for a change with the file in context
Select some code or just keep a file open, then type your request. The extension passes the active file and selection automatically, so you can refer to this function or the selected lines.
Step 4: Review the inline diff
Edits appear as a native VS Code diff. Accept, reject, or keep refining, the same review loop as the terminal, but with full editor tooling around it.
Result: you get Claude Code's agent with VS Code's diff view, file tree, and search, which makes reviewing larger changes much easier than scrolling a terminal.
Watch related tutorials
13:05
16:58
14:00
10:00
9:47
26:11