Claude Code IDE Integration (VS Code / JetBrains)
Claude Code can be used from the terminal, but the IDE integration — which lets you stay inside your editor — is extremely convenient. Extensions are available for VS Code and JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, and more), letting you leverage your editor's context to get the most out of the AI assistant.
This article covers how to set up each IDE and how to incorporate Claude Code into your daily development workflow.
IDE Integration Overview
Differences from the Terminal Version
Claude Code was originally a CLI tool that runs in the terminal, but with IDE integration you can work entirely within your editor.
| Terminal version | IDE integration | |
|---|---|---|
| Environment | Terminal (command line) | VS Code / JetBrains side panel |
| Context | Manually specify file paths and contents | Automatically recognizes open files and selected code |
| Diff view | Text output in the terminal | Inline diff view that is easy to read |
| File operations | Operated via commands | Changes apply directly in the editor |
| Conversation continuity | Session may be interrupted | Conversation persists tied to the workspace |
Benefits of IDE Integration
- Send selected code directly as context: Select a range in the editor and ask Claude — that code is automatically included as context
- Inline diff view: Change proposals are shown as diffs; you can Accept or Reject each one
- Seamless file changes: Claude's proposed changes are reflected directly in the editor, so you can review them before saving
- Execution via the integrated terminal: Claude Code runs in the IDE's built-in terminal, so your working context is never interrupted
- Shared conversation with the CLI: The VS Code extension embeds the CLI, so conversations started in the CLI can be continued inside the IDE, and vice versa
- Checkpoint feature: Automatically creates Git snapshots during your session so you can safely roll back changes
Four Ways to Use Claude Code
Claude Code is available in four forms. They all use the same AI capabilities, and you can switch between them depending on the situation.
| Form | Characteristics | Best for |
|---|---|---|
| CLI (terminal) | Launch with the claude command | Large-scale changes, embedding in scripts |
| IDE extension | VS Code / JetBrains side panel | Day-to-day coding |
| Desktop app | Code mode in Claude Desktop | When you want to combine with other Claude features |
| Web app | claude.ai/code | When you want to work entirely in the browser |
How They Complement Each Other
IDE integration and the terminal version are not mutually exclusive — using them situationally is the most effective approach.
- IDE integration is best for: Reviewing, editing, or asking questions about specific files while viewing them in the editor
- Terminal version is best for: Large-scale changes that span the whole project, embedding in CI/CD scripts, multi-step automation tasks
VS Code Extension
Installation
The standard way to add Claude Code to VS Code goes through VS Code's built-in terminal. There are two approaches: installing from the Extension Marketplace, or launching directly from the CLI.
Requirements: VS Code 1.98.0 or later is required. The same package also supports Cursor IDE.
Install from the Extension Marketplace
- Click the "Extensions" icon in the VS Code left sidebar (or press
Ctrl+Shift+X/Cmd+Shift+X) - Type "Claude Code" in the search box
- Select the "Claude Code" extension published by Anthropic and click "Install"
Launch Directly from the CLI
If Claude Code is already installed, you can simply run the following command in any project directory to start it with VS Code integration.
claude
When run in VS Code's integrated terminal, it automatically detects the VS Code context (open files, workspace information).
Initial Setup
After installing the extension, the following setup is required on first launch.
- Authentication: Sign in with your claude.ai account (if you haven't set this up yet, read Getting Started with Claude Code first)
- Grant workspace access: Allow Claude Code to read and write files in the workspace
Troubleshooting: If you see "Permission denied," check the Permission settings in the extension. Open VS Code Settings (
Cmd+,/Ctrl+,), search for "Claude Code," and review the Workspace Trust settings.
Chat in the Side Panel
After installing the extension, a Claude Code icon appears in the VS Code left sidebar. Click it to open the side panel, where you can have a chat-style conversation.
From the side panel you can:
- Ask free-form questions: Type questions about your code in natural language
- Reference files: Type
@to trigger filename completion and add specific files to the context - Send selected code: Select code in the editor and type a question in the panel — the selected code is automatically included
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Open / close the Claude Code panel | Ctrl+Shift+C |
| Send selected code to Claude | Select code, then Ctrl+Shift+Enter |
| Accept inline diff | Ctrl+Enter |
| Reject inline diff | Ctrl+Delete |
| Clear conversation | Type /clear in the chat |
Tips: You can customize keybindings in VS Code's "Keyboard Shortcuts" settings (
Cmd+K Cmd+S/Ctrl+K Ctrl+S). Search for "claude" to see all Claude Code-related shortcuts listed in one place.
Working with Inline Diffs
When Claude Code proposes changes, they appear as diffs in the editor. Deleted lines are shown in red and added lines in green — the same familiar look as a Git diff view.
- Accept: Apply the change to the file
- Reject: Discard the change and keep the original code
- Accept All / Reject All: Apply bulk operations when there are multiple changes
Troubleshooting: If the inline diff is not appearing and Claude's response only shows a code block in the chat, check whether the extension is on the latest version. Older versions may not support the inline diff feature.
JetBrains Plugin
Claude Code is also available for JetBrains IDEs including IntelliJ IDEA, WebStorm, PyCharm, and GoLand.
Supported IDEs
- IntelliJ IDEA (Ultimate / Community)
- WebStorm
- PyCharm (Professional / Community)
- GoLand
- Rider
- CLion
- PhpStorm
Installation
Install from JetBrains Marketplace
- Open Settings from the IDE menu
- macOS:
Cmd+, - Windows / Linux:
Ctrl+Alt+S
- macOS:
- Select Plugins
- Open the Marketplace tab and search for "Claude Code"
- Click Install on the "Claude Code" plugin published by Anthropic
- Restart the IDE
Launch from the Integrated Terminal
Just like with VS Code, running the claude command in the JetBrains IDE's integrated terminal starts Claude Code with the IDE's context available.
claude
Using the Tool Window
After installing the plugin, a "Claude Code" tool window is added to the right sidebar of the IDE. If it is not visible, open it via View > Tool Windows > Claude Code.
The functionality is equivalent to the VS Code version:
- Chat-style questions and conversation
- Add files to context using
@filenamesyntax - Send selected code
- View inline diffs and Accept / Reject changes
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Open / close the Claude Code tool window | Ctrl+Shift+C |
| Send selected code to Claude | Select code, then Ctrl+Shift+Enter |
| Accept inline diff | Ctrl+Enter |
| Reject inline diff | Ctrl+Delete |
Tips: In JetBrains IDEs, go to Settings > Keymap and search for "Claude" to see all Claude Code keybindings in one place. Conflicting shortcuts are highlighted in red so you can resolve them on the spot.
Feature Differences from the VS Code Version
As of March 2026, the VS Code and JetBrains versions offer nearly identical functionality. The main differences are:
| Feature | VS Code | JetBrains |
|---|---|---|
| Chat panel | Sidebar | Tool window |
| Inline diff | Yes | Yes |
| File reference (@ completion) | Yes | Yes |
| Terminal integration | Via built-in terminal | Via built-in terminal |
| Git integration | Yes | Yes |
| Refactoring suggestions | Yes | Yes |
Troubleshooting: In JetBrains IDEs, the tool window may not appear unless the plugin is enabled with a project open. Try restarting the IDE or closing and reopening the project.
Daily Development Workflow
Here are practical development workflows using IDE integration.
Select Code and Ask a Question
This is the most common pattern.
- Select the code you are interested in (a function, class, entire file, etc.)
- Open the Claude Code panel / tool window
- Type your question (the selected code is automatically included as context)
Example prompts:
Tell me about any performance issues in this code
This class has too many methods. Suggest a way to split it up
Add TypeScript types to this code
Request a Fix for an Error
When you encounter a compile error or runtime error:
- Select the code that has the error
- Copy the error message
- Paste "Fix this error" along with the error message into the Claude Code panel
Example prompt:
I'm getting the following error. Please fix it.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
Once Claude proposes a fix, review it in the inline diff and choose Accept or Reject.
Auto-Generate Tests
- Select the function or class you want to write tests for
- Give the instruction "Write unit tests"
Example prompt:
Write unit tests for the selected code.
Use Vitest as the framework. Include edge cases.
Once a test file is proposed, you can save it as a new file or append it to an existing test file.
Generate a Commit Message
- Review the output of
git diff --stagedin the IDE's integrated terminal (or pass it directly to Claude) - Ask Claude to "Generate a commit message"
Example (chat panel):
@src/utils/date.ts @src/utils/date.test.ts
Generate a Conventional Commits commit message for these changes
Example (when Claude Code is running in the integrated terminal):
git diff --staged | claude -p "Generate a commit message in Conventional Commits format"
Request a Refactor
- Select the code to refactor (or reference the entire file with
@filename) - Describe the refactoring direction
Example prompt:
@src/components/UserForm.tsx
This component has grown too large. Please split it by responsibility.
Do not change the props type definitions.
Tips: When requesting a refactor, also state what you do NOT want changed — this helps prevent unintended modifications. For example: "Do not modify the tests" or "Maintain the API type definitions."
When to Use Terminal vs. IDE Integration
When IDE Integration Is Better
- File-level work: Writing, editing, or reviewing code while viewing a specific file
- Interactive editing: Repeatedly reviewing change proposals and choosing Accept / Reject
- Clear context: You know exactly which file and which section you are working on
- Normal development work: Feature implementation, bug fixes, refactoring, and other everyday coding tasks
When the Terminal Version Is Better
- Cross-project work: Refactoring across multiple directories, bulk search and replace
- Automation / scripting: Embedding
claude -pin shell scripts - Large-scale changes: Processing changes that affect dozens of files at once
- CI/CD integration: Using Claude Code inside a GitHub Actions pipeline or similar
Combining both: Use IDE integration for everyday implementation while handling cross-cutting tasks — such as "Translate all comments to English throughout the project" — with the terminal version.
Settings and Customization
VS Code Settings
Open VS Code Settings (Cmd+, / Ctrl+,) and search for "Claude Code" to configure the following options:
| Setting | Description |
|---|---|
claudeCode.model | Specify the model to use (e.g., claude-sonnet-4-5) |
claudeCode.autoApprove | Set which types of actions are auto-approved |
claudeCode.contextLines | Number of lines of code sent as context (default: 50) |
JetBrains Settings
Go to Settings > Tools > Claude Code to configure:
| Setting | Description |
|---|---|
| Model | Select the model to use |
| Auto-approve actions | Types of actions to auto-approve |
| Context window | Number of lines to include in the context |
Customizing Keybindings
VS Code: Open Keyboard Shortcuts with Ctrl+K Ctrl+S and search for "claude."
JetBrains: Open Settings with Ctrl+Alt+S and search for "claude" under Keymap.
Permission Settings
You can restrict or allow the operations Claude Code is permitted to perform. This is especially important when using it on a team or on a shared machine.
- Read: Reading files
- Write: Writing / modifying files
- Execute: Running shell commands
From the Claude Code settings in each IDE, you can configure which actions are auto-approved and which require confirmation each time.
Tips: For a project you are working with for the first time, start with strict permissions (no auto-approval) and loosen them as you get comfortable with how Claude behaves.
Adding Project-Specific Settings with CLAUDE.md
Rules written in CLAUDE.md are also loaded when using IDE integration.
## Notes for IDE Usage
- Always confirm that tests pass before accepting a code change
- Do not commit auto-generated code before review
- Do not change type definitions during refactoring
For details, see Getting Started with Claude Code — Creating CLAUDE.md.
Troubleshooting
Extension / Plugin Not Recognized
Symptom: The Claude Code panel does not appear even though the extension appears to be installed.
Fix:
- Fully restart the IDE (close the window and reopen it)
- Verify the extension is enabled (VS Code: check that the extension shows as "Enabled" in the extensions list)
- Confirm the Claude Code CLI itself is installed:
claude --version
Authentication Error
Symptom: An error such as "Authentication failed" or "Not authorized" is displayed.
Fix:
- Run
claudein the terminal to verify that authentication works - Restart the IDE and sign in again
- If you are using an API key, confirm the environment variable is set correctly
echo $ANTHROPIC_API_KEY
Troubleshooting: If you set an environment variable in
.bashrcor.zshrc, it will not take effect until you open a new terminal session. You need to fully restart the IDE.
Inline Diff Not Appearing
Symptom: Claude's response only appears as text in the chat and no diff is shown in the editor.
Fix:
- Update the extension to the latest version
- In VS Code: run the Developer: Reload Window command (open the command palette with
Cmd+Shift+P/Ctrl+Shift+Pand search for it) - The diff view may be suppressed when a file has unsaved changes. Try saving the file first, then try again
Slow Response
Symptom: Claude's response is slow or times out.
Fix:
- Reduce the context window (the amount of code sent). Lower the
contextLinessetting - Instead of including an entire large file as context, select only the relevant portion and send that
- Use the
/compactcommand to summarize the conversation and reduce token usage
claude Command Not Found in VS Code
Symptom: Running claude in the integrated terminal produces "command not found."
Fix: VS Code's integrated terminal may not be loading the system PATH correctly.
- Run
which claudein a WSL terminal to find the installation path - Verify that VS Code is connected to WSL via the WSL extension (check that "WSL" appears in the bottom-left status bar)
- Install the WSL extension and work from a WSL workspace
Next Steps
Once you are comfortable with IDE integration, move on to articles that help you get even more out of Claude Code.
- Claude Code Practical Workflow Guide — Practical workflows for code review, bug fixes, test generation, and more
- Getting Started with Claude Code — Using the terminal version and configuring CLAUDE.md
- Claude Code Guide for Non-Engineers — A guide you can share with team members who are new to Claude Code