Installation
VS Code Extension
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for “Claude Code”
- Click Install
Prerequisites
- VS Code: Version 1.85.0 or higher
- Claude Code CLI: Must be installed globally
- Authentication: Anthropic account with API access
Getting Started
First Launch
- Open a project folder in VS Code
- Open the Claude Code sidebar (click icon in activity bar)
- Authenticate with your Anthropic account
- Start chatting with Claude
Interface Overview
Sidebar Panel: Main chat interface- Message input at bottom
- Conversation history
- File attachments
- Model selection
Core Features
Chat Interface
Send messages: Type and press Enter (or Shift+Enter for multi-line) File references: Type@ to mention files
Slash commands: Type / for quick actions
Code blocks: Hover for copy/insert actions
File Context
Attach files to provide context: Drag and drop: Drag files from explorer to chat @-mentions: Type@ and select files
Selection: Highlight code and use “Ask Claude” from context menu
Code Actions
Inline suggestions: Click code blocks to:- Copy to clipboard
- Insert at cursor
- Create new file
- Show diff
- Explain this code
- Find bugs
- Improve performance
- Add tests
- Refactor
Multi-file Editing
Claude can edit multiple files simultaneously:- Show planned changes for each file
- Display diffs side-by-side
- Apply changes after approval
Extension Settings
Configure via Settings (Ctrl+, / Cmd+,) and search “Claude Code”:General Settings
Python Environment
Performance
Keyboard Shortcuts
Default shortcuts (customizable):| Action | Windows/Linux | macOS |
|---|---|---|
| Open Claude Code | Ctrl+Shift+C | Cmd+Shift+C |
| New conversation | Ctrl+Shift+N | Cmd+Shift+N |
| Focus input | Ctrl+L | Cmd+L |
| Insert code | Ctrl+Enter | Cmd+Enter |
| Explain selection | Ctrl+Shift+E | Cmd+Shift+E |
| Find bugs | Ctrl+Shift+B | Cmd+Shift+B |
Customize Shortcuts
- Open Keyboard Shortcuts (Ctrl+K Ctrl+S)
- Search “Claude Code”
- Click pencil icon to edit
- Press new key combination
Workflows
Code Explanation
- Select code in editor
- Right-click → “Ask Claude” → “Explain this code”
- Read explanation in sidebar
Bug Fixing
- Select problematic code
- Right-click → “Ask Claude” → “Find bugs”
- Review suggested fixes
- Click “Apply” to insert fix
Refactoring
- Select code to refactor
- Type in chat: “Refactor this to use async/await”
- Review diff
- Accept or request changes
Test Generation
- Select function to test
- Ask: “Write unit tests for this function”
- Review generated tests
- Insert into test file
Multi-file Feature Development
- Open chat
- Describe feature: “Add user authentication with JWT”
- Review Claude’s plan
- Approve implementation
- Review diffs for all files
- Apply changes
Session Management
Viewing Sessions
Click “Sessions” button in sidebar to:- View conversation history
- Resume previous sessions
- Search sessions by content
- Filter by date or branch
Resume Session
- Open sessions panel
- Search or browse sessions
- Click to resume
- Continue conversation
Session Forking
Explore alternative approaches:- Open session
- Click message where you want to branch
- Click “Fork from here”
- New session starts from that point
Remote Sessions
For OAuth users:- Browse sessions from claude.ai
- Resume sessions from other devices
- Sync across VS Code instances
Plan Mode
Review Claude’s plan before implementation:- Ask Claude to implement a feature
- Claude shows implementation plan
- Review plan in sidebar
- Comment on specific steps
- Approve or request changes
- Claude implements approved plan
- Step-by-step breakdown
- File changes preview
- Inline comments
- Accept/reject workflow
Usage Tracking
View usage in sidebar: Current session:- Tokens used
- Tool calls
- Duration
- Monthly usage
- Remaining quota
- Usage by project
/usage command for details.
Plugin Support
VS Code extension supports Claude Code plugins:Installing Plugins
- Open command palette (Ctrl+Shift+P)
- Run “Claude Code: Manage Plugins”
- Browse and install plugins
Plugin Marketplace
Browse plugins directly in VS Code:- Search by name or category
- View install counts
- Read descriptions
- See trust warnings
- Install with one click
Local Plugins
Project-specific plugins in.claude/ are automatically loaded.
Advanced Features
Background Agents
Run agents while you work:MCP Tools
MCP servers configured in.claude/.mcp.json are available:
Custom Commands
Project commands in.claude/commands/ appear in command palette:
- Press Ctrl+Shift+P
- Type command name
- Execute
Git Integration
Git operations work seamlessly:Troubleshooting
Extension Not Starting
Issue: Claude Code sidebar is empty or shows error Solutions:- Ensure Claude Code CLI is installed:
claude --version - Check authentication:
claude auth status - Restart VS Code
- Check extension logs: Developer → Show Logs → Extension Host
File References Not Working
Issue: @-mentions don’t autocomplete Solutions:- Ensure folder is opened in VS Code (not just files)
- Check file search is enabled in workspace settings
- Reload window: Ctrl+Shift+P → “Reload Window”
High CPU Usage
Issue: VS Code uses excessive CPU Solutions:- Disable background tasks:
claudeCode.disableBackgroundTasks: true - Use simple mode: Set
CLAUDE_CODE_SIMPLE=truein environment - Reduce MCP servers
- Compact conversation:
/compact
Sessions Not Syncing
Issue: Remote sessions don’t appear Solutions:- Verify OAuth authentication
- Check internet connection
- Refresh sessions panel
- Re-authenticate:
claude auth login
Keyboard Shortcuts Conflict
Issue: Shortcuts don’t work or trigger wrong actions Solutions:- Check for conflicts in Keyboard Shortcuts editor
- Customize bindings
- Disable conflicting extensions
Best Practices
Comparison: VS Code vs Terminal
| Feature | VS Code Extension | Terminal |
|---|---|---|
| Code actions | ✓ Quick fixes, inline suggestions | ✗ |
| File navigation | ✓ Integrated file explorer | Manual paths |
| Diff view | ✓ Side-by-side diffs | Text diffs |
| Plan mode | ✓ Visual plan review | Text-based |
| Session UI | ✓ Graphical history | Command-line resume |
| Git integration | ✓ PR status in UI | Status in prompt |
| Multi-file edits | ✓ Visual diff | Text diff |
| Plugins | ✓ Visual marketplace | CLI commands |
| Performance | Slightly slower | Faster |
| Flexibility | IDE-bound | Works anywhere |
- Working on complex features
- Need visual diffs
- Want integrated experience
- Use code actions frequently
- Quick tasks
- Remote servers
- CI/CD integration
- Maximum performance
Next Steps
Quickstart
Learn basic commands and workflows
Git Workflows
Master git operations
Task Automation
Create custom commands and agents
Settings
Customize extension settings