Purpose
Claude Code already provides official IDE integrations for VS Code and JetBrains, but does not yet support Visual Studio. This extension implements the same integration protocol for Visual Studio, enabling the CLI to drive real Visual Studio diff comparison windows and read your selected code and build errors, without having to manually copy and paste into the terminal. It is a community project, not affiliated with Anthropic, and currently only supports Visual Studio 2026.
Main capabilities
-
Native diff comparison and single accept/reject: Claude's edits open in the Visual Studio diff viewer, where approving is the only step, and duplicate y/n prompts no longer appear in the terminal. You can reject with feedback, and Claude will reconsider based on your explanation. The panel provides a "Run wild" (auto-accept) toggle, which applies edits directly without opening the diff comparison, and resets each session.
-
Diagnostics sharing and builds: Claude reads Visual Studio's compiler errors and warnings (C# and C++) and fixes them. It runs Visual Studio's own build, rather than a standalone dotnet build, and can return real errors and warnings with file, line number, and project. It can build a single project or only the project containing the edited file, and long builds continue in the background without timing out. It can also read the Debug pane of the Output window, including Debug/Trace output, assembly binding failures, and first-chance exception notifications that appear even when exceptions are caught.
-
Semantic code navigation: Obtains the parsed meaning of C# through Roslyn, including find all references, go to definition, find implementations, call/type hierarchies, and can correctly handle indirect references, interface dispatch, overloads, explicit interface implementations, and transitive callers. No debugging session is required; it works as long as a C#/VB solution is loaded. It can also read the decompiled bodies of methods in referenced DLLs, and core .NET types can obtain runtime source code through SourceLink.
-
Live debugger: When paused at a breakpoint, Claude can view runtime state such as the call stack, variable values, and threads; after enabling driving, it can continue, step, set breakpoints, break at exception throw points, set data breakpoints (break when a value changes or track the full change history), attach to a running application, andand suspend suspended processes to trace cross-thread lock ownership chains and untangle deadlocks.
-
Test Integration: Discover, run, and debug unit tests through the Visual Studio Test Explorer engine, get per-test results (outcome, message, stack), rerun only failed tests after fixing, or stop at the point of failure when debugging a failed test, and also repeatedly run flaky tests until they fail and pause in that run.
-
Panel and Interface: A dockable Claude Code panel shows connection status, edit decisions, token usage, and estimated cost (latest call and cumulative session). Each change has a clickable record in the panel that opens the file to the corresponding line, one line per changed region rather than one line per file, with +3 -1 counts. Supports a Simplified Chinese interface, switching with the Visual Studio display language.
How to Use
The extension provides an editor context menu "Claude Code", including Explain and Add to Chat (Alt+K), Fix Errors (with a real error list diagnostic), Generate Documentation and Add Comments (parsing the function at the cursor via Roslyn), and Fix This Test in test files. None of the operations commit automatically: references land in the CLI edit box, and after the terminal gains focus, press Enter to send; every edit still has to pass the diff comparison gate. In Solution Explorer, right-click "Add to Chat" can point to files or folders that are not open, and each reference is mentioned as a whole file in @ form. The panel can launch claude in Visual Studio's built-in dockable terminal window, and an external console button can also be used. Supports pasting screenshots and attaching files (press Paste after Win+Shift+S or drag in from File Explorer); attachments show estimated token cost, and file copies are stored in the gitignored .claude/attachments/ directory. Screen capture can optionally be enabled, letting Claude obtain screenshots of the debugged app window, a window with a specified title, the VS window, or the entire screen. Provides in-IDE notifications when Claude finishes responding or needs input, and can be muted.
Applicable Scenarios and Limitations
Suitable for developers who want to use Claude Code within Visual Studio 2026 for C#/.NET development, debugging, testing, and code navigation.Limitations: community project, not official from Anthropic; currently only supports Visual Studio 2026; testing is based on claude 2.1.223; claude CLI terminal text is still in English; screen capture is off by default and requires authorization to enable; some capabilities (such as data breakpoints) depend on bundled debug engine components. Installation methods, specific requirements, quick start steps, source build methods, and troubleshooting are not clearly detailed in the provided materials and are not currently available.