Claude Code VS Code: Easy IDE Guide

VS Code developers can supercharge their daily workflow with the Claude Code extension, bringing AI-powered coding assistance directly into the editor. The JetBrains plugin offers parallel capabilities for IntelliJ, PyCharm, and WebStorm users. This guide covers installation, core features, and workflow patterns for both IDE integrations.

Claude Code VS Code: Easy IDE Guide — title card

VS Code: What You’ll Learn

Working with Claude Code inside your preferred IDE transforms how you write, review, and refactor code. Whether you use VS Code as your daily driver or prefer JetBrains tools like IntelliJ and PyCharm, this guide walks through every installation step and feature. By the end, you will know exactly how VS Code and JetBrains integrations differ and which setup fits your team.

Why Use Claude Code Inside Your IDE

Claude Code works as a standalone command-line tool, but running it inside your IDE unlocks a tighter feedback loop. Instead of switching between a terminal and your editor, you see proposed changes as inline diffs, share your current selection automatically, and review plans without leaving your workflow. The VS Code extension and the JetBrains plugin each bring these capabilities to their respective platforms.

Both integrations connect Claude to your editor context: the file you have open, the text you have selected, and the diagnostics your IDE reports. This means Claude can see a lint error and propose a fix in the same view where you are working. You stay in flow, review the diff, and accept or reject changes with a keystroke.

The key advantage is reducing context switching. When Claude runs in a separate terminal, you copy code snippets back and forth, describe file paths manually, and lose your editor’s diagnostic information. Inside the IDE, all of that context flows automatically. For teams adopting Claude Code, the project setup guide explains how to configure your workspace before installing the IDE integration.

Installing the VS Code Extension

The extension provides a native graphical panel for Claude Code. It is the recommended way to use Claude Code in VS Code, and it bundles its own copy of the CLI for the chat panel so you do not need a separate install to start chatting.

Prerequisites and Requirements

Before installing, make sure you have VS Code version 1.98.0 or higher. You also need an Anthropic account: any paid Claude subscription (Pro, Max, Team, or Enterprise) or a Claude Console account works. No API key is required because you sign in with your Claude account when you first open the extension. If you access Claude through Amazon Bedrock or Google Cloud’s Agent Platform, the official documentation explains third-party provider setup.

Step-by-Step Installation

Open the Extensions view by pressing Cmd+Shift+X on Mac or Ctrl+Shift+X on Windows and Linux. Search for “Claude Code” and click Install. The extension ID is anthropic.claude-code. If the extension does not appear after installation, restart VS Code or run “Developer: Reload Window” from the Command Palette.

# Open Extensions view and search
# Cmd+Shift+X (Mac) / Ctrl+Shift+X (Windows/Linux)
# Search: "Claude Code" -> Click Install

# The extension also works in VS Code forks:
# Cursor, Devin Desktop, Kiro -- via Open VSX registry
# https://open-vsx.org/extension/Anthropic/claude-code

The extension also installs in other VS Code forks like Cursor. Search for “Claude Code” in the editor’s Extensions view, or install from the Open VSX registry. If your editor cannot install the extension, install the CLI and run claude in its integrated terminal instead.

VS Code Extension Core Features

Once installed, the extension gives you a graphical chat panel, inline diff review, plan mode, conversation history, and checkpoint rewind. The Spark icon indicates Claude Code throughout the editor. Click it in the Editor Toolbar, the Activity Bar, or the Status Bar to open the panel.

Inline Diffs and Change Review

When Claude wants to edit a file, it shows a side-by-side comparison of the original and proposed changes, then asks for permission. You can accept, reject, or tell Claude what to do instead. If you edit the proposed content directly in the diff view before accepting, Claude is told that you modified it, so it does not assume the file matches its original proposal. This review loop keeps you in control of every change.

Plan Mode and Markdown Review

In Plan mode, Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins. This is useful for complex refactors where you want to shape the approach before any code is written. You switch permission modes by clicking the mode indicator at the bottom of the prompt box.

Conversation History and Multiple Tabs

Click the Session History button at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time period. Click any conversation to resume it with full message history. New sessions receive AI-generated titles based on your first message. You can also open multiple conversations in separate tabs or windows, each maintaining its own context. A colored dot on the tab icon indicates status: blue means a permission request is pending, orange means Claude finished while the tab was hidden.

Checkpoints and Rewind

The extension supports checkpoints, which track Claude’s file edits and let you rewind to a previous state. Hover over any message to reveal the rewind button, then choose from three options: fork the conversation from that point, rewind code to that point while keeping the full conversation history, or fork and rewind together. This safety net lets you experiment freely and roll back if a direction does not work out.

Working With @-Mentions and File References

Use @-mentions to give Claude context about specific files or folders. When you type @ followed by a file or folder name, Claude reads that content and can answer questions about it. The extension supports fuzzy matching, so you can type partial names to find what you need.

> Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts)
> What's in @src/components/ (trailing slash for folders)
> Review @app.ts#5-10 (specific line range from selection)

When you select text in the editor, Claude sees your highlighted code automatically. The prompt box footer shows how many lines are selected. Press Option+K on Mac or Alt+K on Windows and Linux to insert an @-mention reference with the file path and line numbers, like @app.ts#5-10. Click the selection indicator to toggle whether Claude can see your highlighted text. You can also hold Shift while dragging files into the prompt box to add them as attachments.

Keyboard Shortcuts for VS Code

The extension registers several keyboard shortcuts. Use Cmd+Esc or Ctrl+Esc to toggle focus between the editor and Claude’s prompt box. Press Cmd+Shift+Esc or Ctrl+Shift+Esc to open a new conversation as an editor tab. To insert an @-mention reference for the current file and selection, use Option+K or Alt+K. For multi-line input without sending, press Shift+Enter.

Installing the JetBrains Plugin

The JetBrains plugin takes a different architectural approach than the VS Code extension. It does not bundle its own copy of the CLI. Instead, it runs the claude command in your IDE’s integrated terminal and connects to it. This means you must install both pieces: the standalone CLI first, then the plugin.

Supported IDEs

The Claude Code plugin works with most JetBrains IDEs, including IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, and GoLand. If your JetBrains IDE is not listed but supports the plugin system, it may still work. The plugin is distributed as “Claude Code [Beta]” on the JetBrains Marketplace.

Installation Steps

First, install the Claude Code CLI by following the standard quickstart. The plugin shows a “Cannot launch Claude Code” notification when claude is not on your PATH. Second, install the Claude Code plugin from the JetBrains Marketplace and restart your IDE completely. After restarting, run claude from your IDE’s integrated terminal and all integration features will be active.

# Step 1: Install the CLI (follow quickstart docs)
# Verify installation:
claude --version

# Step 2: Install JetBrains plugin
# JetBrains Marketplace -> search "Claude Code" -> Install
# Plugin URL: https://plugins.jetbrains.com/plugin/27310-claude-code-beta-

# Step 3: Restart your IDE completely

# Step 4: Run claude from the integrated terminal
claude

If claude is installed somewhere your IDE cannot find, set the full path in the plugin’s Claude command setting under Settings, then Tools, then Claude Code Beta. For WSL users, set the Claude command to wsl -d Ubuntu -- bash -lic "claude" with your distribution name.

JetBrains Plugin Core Features

The JetBrains plugin provides five integration features that connect Claude Code to your IDE. Each feature works automatically once you run claude from the integrated terminal, with no additional configuration needed beyond the initial plugin install.

Quick Launch

Use Cmd+Esc on Mac or Ctrl+Esc on Windows and Linux to open Claude Code directly from your editor. You can also click the Claude Code button in the UI. This shortcut matches the VS Code focus toggle, so users switching between IDEs do not need to relearn the muscle memory.

Diff Viewing in the IDE

Code changes can be displayed directly in the IDE’s built-in diff viewer instead of the terminal. This gives you the same native diff experience you are used to from git operations. To configure where diffs appear, run the /config command inside Claude Code and set the diff tool to auto for the IDE viewer or terminal to keep them in the terminal.

Diagnostic Sharing

Diagnostic errors from the IDE, such as lint warnings and syntax errors, are automatically shared with Claude as you work. This means Claude can see the same red squiggles you see and propose fixes that address the actual compiler or linter output. Read deny rules in your permissions configuration can block this sharing for matching files if you need to exclude certain paths.

File Reference Shortcuts

Use Cmd+Option+K on Mac or Alt+Ctrl+K on Linux and Windows to insert file references such as @src/auth.ts#L1-99. This shortcut is the JetBrains equivalent of the VS Code Option+K shortcut, letting you reference specific line ranges without typing the path manually.

Selection Context Sharing

The current selection or active tab in the IDE is automatically shared with Claude Code. When you highlight a block of code and switch to the Claude terminal, Claude already knows what you have selected. This mirrors the VS Code behavior where the prompt box footer shows how many lines are selected.

VS Code vs JetBrains: Choosing Your IDE

Both integrations connect Claude Code to your editor, but they differ in architecture and depth. The VS Code extension is a self-contained graphical panel with its own bundled CLI, while the JetBrains plugin wraps the standalone CLI in your IDE’s terminal. Here is how they compare across key dimensions.

Installation Complexity

The extension is a single install: search, click, and you are done. The JetBrains plugin requires two steps: install the CLI first, then the plugin, then restart your IDE. If the CLI is not on your PATH, the JetBrains plugin cannot launch.

Feature Depth

The extension offers a richer graphical interface. You get a dedicated chat panel, plan mode with a full Markdown review document, a plugins manager accessible via /plugins, checkpoint rewind with three fork options, and multiple conversation tabs with status indicators. The JetBrains plugin focuses on the core integration: diff viewing, diagnostic sharing, selection context, and file references. It runs the CLI in a terminal, so all CLI commands are available, but the graphical layer is thinner.

Terminal vs Graphical Panel

JetBrains users always work with the CLI in a terminal, which means every CLI command is available. Users get a graphical panel by default but can switch to terminal mode by checking the Use Terminal setting. If you need a CLI-only feature in VS Code, open the integrated terminal and run claude. The extension and CLI share the same conversation history, so you can resume an extension conversation in the CLI with claude --resume.

When to Pick Which

If you already use VS Code or a fork like Cursor, the extension is the natural choice because it gives you the richest graphical experience. If your team standardizes on IntelliJ or PyCharm for Java or Python development, the JetBrains plugin brings Claude Code into that workflow without switching editors. Both integrations support the same underlying Claude Code capabilities, so your choice is about editor preference, not AI power.

Common Workflow Patterns Across Both IDEs

Regardless of which IDE integration you use, certain workflow patterns recur. Mastering these patterns helps you get the most out of Claude Code in any editor.

Code Review and Refactoring

Select a function or block of code, then ask Claude to refactor it. In the extension, the selection is shared automatically and you can press Option+K to add a file reference. In JetBrains, the selection is also shared automatically. Claude proposes changes as a diff that you review before accepting. This pattern works identically in both IDEs because the underlying diff review mechanism is the same.

Git Operations

Ask Claude to commit changes, create pull requests, or summarize what you have changed. Claude stages files, writes commit messages based on the actual diff, and generates PR descriptions. You can also use the --worktree flag to start Claude in an isolated git worktree for parallel task work. For automating git hooks, see the hooks guide.

Debugging With Diagnostics

Both integrations share IDE diagnostics with Claude. When you see a lint error or type error, switch to Claude and ask for help. Claude already knows about the error and can propose a fix. In JetBrains, diagnostics are shared automatically. In VS Code, the same happens through the built-in IDE MCP server that connects Claude to the editor’s diagnostic output.

Permission Modes and Plan Review

Permission modes control how Claude asks for approval before taking actions. Both integrations support the same modes because they are a CLI-level feature. In the VS Code extension, click the mode indicator at the bottom of the prompt box to switch. In JetBrains, set the default permission mode in your Claude Code settings.

Manual mode asks permission before each action. Plan mode describes what Claude will do and waits for approval, opening the plan as a reviewable document. Edit automatically mode makes edits without asking. Choose Manual or Plan mode when working with unfamiliar code, and switch to auto-accept only when you trust the changes Claude will make.

For custom commands that run automatically in specific contexts, the skills guide explains how to define and invoke them from within your IDE session.

MCP Servers and Plugins in the IDE

MCP (Model Context Protocol) servers give Claude access to external tools, databases, and APIs. Open the integrated terminal and run claude mcp add to configure a server. Once added, type /mcp in the chat panel to manage servers without leaving VS Code. The MCP dialog lets you enable or disable servers, reconnect, and manage OAuth authentication.

# Add GitHub's remote MCP server in VS Code terminal
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ 
  --header "Authorization: Bearer YOUR_GITHUB_PAT"

# Manage servers from the VS Code chat panel
# Type /mcp in the prompt box

# In JetBrains, run the same claude mcp add command
# from the IDE's integrated terminal

In JetBrains, run the same claude mcp add command from the IDE’s integrated terminal. The configuration is shared between the CLI and the IDE integration because it lives in ~/.claude/settings.json. The extension also includes a graphical plugin manager: type /plugins to install, enable, or disable plugins from configured marketplaces. For full details on available servers, see the official VS Code documentation.

A Worked Example

Imagine you are working on a Python authentication module in VS Code and a lint error appears on line 42 of auth.py. You select the function around that line, press Option+K to insert an @-mention reference, and type: “Fix the lint error on this function and add a docstring.” Claude sees the selected code, the lint diagnostic, and the file context. It proposes a fix as an inline diff showing the new docstring and the corrected line. You review the diff, notice the fix is correct, and click Accept. The file is saved automatically because the extension’s autosave setting is on by default. You then ask Claude to run the test suite, and it executes pytest tests/test_auth.py in the integrated terminal, showing the results inline. The entire interaction happens without leaving VS Code.

Now imagine the same task in PyCharm with the JetBrains plugin. You select the same function, press Cmd+Esc to focus the Claude terminal, and type the same prompt. Claude sees your selection and the diagnostic error that the IDE shared. It proposes the fix in the IDE’s native diff viewer. You accept the change, and the file updates in your editor. The workflow is nearly identical: the difference is that JetBrains shows the diff in the IDE’s diff viewer while the extension shows it in a side-by-side panel within the extension. Both paths get you to the same result with the same number of steps.

In both cases, you can then ask Claude to commit the change. Claude stages the file, writes a commit message based on the diff, and creates the commit. If you want a pull request, ask Claude to create one and it generates a description from the actual code changes. This end-to-end flow, from seeing an error to committing a fix, works identically across both IDE integrations because the underlying Claude Code CLI handles the logic.

VS Code: Common Mistakes to Avoid

Even experienced developers stumble on a few recurring issues when setting up Claude Code in their IDE. Here are the most common mistakes and how to avoid them.

  • Forgetting to install the CLI for JetBrains: The JetBrains plugin does not bundle the CLI. If you install only the plugin and skip the standalone CLI install, you will see a “Cannot launch Claude Code” notification. Always install the CLI first, verify with claude --version, then install the plugin.
  • Using auto-accept mode with untrusted code: In acceptEdits mode, Claude can modify IDE configuration files that your IDE may execute automatically. This is a security risk when working with untrusted repositories. Use Manual or Plan mode for unfamiliar code, and review every change before accepting.
  • Not restarting the IDE after plugin install: The JetBrains plugin sometimes requires a full IDE restart to take effect. If features do not appear after installation, close the IDE completely and reopen it. You may need to do this more than once.
  • Expecting the VS Code extension to add claude to PATH: The extension bundles a private CLI for its chat panel, but typing claude in a terminal requires the standalone CLI install. If you need CLI features in the editor’s integrated terminal, install the CLI separately.
Claude Code VS Code: Easy IDE Guide — key concepts card

VS Code: Best Practices

  • Start with Plan mode for complex tasks: When tackling a refactor that touches multiple files, switch to Plan mode first. Review the plan, add inline comments, and shape the approach before Claude writes any code. This prevents wasted work on a direction you did not want.
  • Use @-mentions for targeted context: Instead of pasting code into the prompt, use @-mentions to reference files and line ranges. Claude reads the actual file content, which is more accurate than pasted snippets and keeps your prompt concise.
  • Leverage checkpoints for experimentation: Before asking Claude to try a risky approach, note your current position. If the direction fails, use the rewind button to fork the conversation or revert code changes without losing your history.
  • Configure permission modes per project: Set the default permission mode in editor settings under claudeCode.initialPermissionMode. Use Manual for unfamiliar projects and auto-accept only for trusted, isolated workspaces.
  • Share diagnostics intentionally: Both IDEs share diagnostics automatically, which is usually helpful. If you work with sensitive files, use Read deny rules to block diagnostic sharing for matching paths and keep Claude focused on the code you want it to see.
Claude Code VS Code: Easy IDE Guide — best practices card

VS Code: Frequently Asked Questions

Do I need an API key to use the VS Code extension?

No. The extension works with any paid Claude subscription including Pro, Max, Team, or Enterprise, or a Claude Console account. You sign in with your Claude account when you first open the extension. No API key is required.

Does the JetBrains plugin bundle the CLI?

No. The JetBrains plugin runs the claude command in your IDE’s integrated terminal. You must install the standalone CLI first. The plugin shows a notification if claude is not found on your PATH.

Can I use Claude Code in Cursor or other VS Code forks?

Yes. The extension installs in VS Code forks like Cursor, Devin Desktop, and Kiro. Search for “Claude Code” in the editor’s Extensions view, or install from the Open VSX registry directly.

How do I connect an external terminal to my IDE?

Run the /ide command inside Claude Code from any external terminal. This connects Claude to your VS Code or JetBrains IDE and activates diff viewing, diagnostic sharing, and selection context features automatically.

What is the difference between Plan mode and Manual mode?

Manual mode asks permission before each action. Plan mode describes what Claude will do and waits for approval, opening the plan as a reviewable document. Plan mode is better for complex tasks where you want to shape the approach first.

If you want to dive deeper after this overview, the next sections link to related guides on project setup, skills, and hooks.

VS Code and JetBrains integrations bring Claude Code directly into your editor, eliminating context switching and giving you inline diffs, diagnostic sharing, and plan review. Start with the extension for VS Code or the plugin for JetBrains, configure your permission modes, and use @-mentions for targeted context.

Continue Learning