Skip to main content

How to Use Claude Code with VS Code

I use Visual Studio Code with Claude Code daily and find this combination incredibly productive. You get VS Code's familiar interface and extensions while leveraging Claude Code's terminal-based AI assistance.

Once you try this combination, there's no turning back!

Quick Setup

The easiest way to connect Claude Code with VS Code:

1. Open VS Code 2. Open the integrated terminal (Ctrl+` or View > Terminal) 3. Run claude in the terminal 4. Start coding with AI assistance right in your familiar editor

Claude Code runs in the terminal while you edit files in the VS Code interface.

VS Code Extension Integration

For the most seamless experience, the Claude Code VS Code extension enhances the workflow:

1. Open VS Code 2. Open the integrated terminal (Ctrl+`) 3. Run claude - the extension will auto-install when it detects Claude Code 4. Use /ide command in any external terminal to connect to VS Code

The extension enhances the integration by providing better context awareness and file synchronization.

Advanced Workflow

I observe two effective approaches for using Claude Code with VS Code:

  • Integrated Terminal: Run Claude directly in VS Code's terminal for tightest integration and real-time file updates
  • Separate Terminal: Run Claude in an external terminal, then switch to VS Code for reviewing changes using its superior visual diff interface and git integration

The separate terminal approach works particularly well when you want to examine Claude's work carefully before committing. VS Code's diff view and git staging interface make it much easier to review large changes.

Key Benefits

  • Familiar interface: Keep using VS Code shortcuts, extensions, and customizations
  • Live file updates: See Claude's changes immediately in your editor
  • Git integration: Use VS Code's visual diff and staging tools to review AI-generated changes
  • Extension ecosystem: Leverage your existing VS Code extensions alongside Claude Code
  • Multi-pane workflow: Edit in VS Code while chatting with Claude in the terminal
Extension Discovery

The Claude Code VS Code extension auto-installs when it detects Claude Code running in the integrated terminal. You don't need to manually install it from the marketplace - just run claude and VS Code handles the rest.