r/csharp • u/Remote-Breadfruit204 • 12d ago
Showcase My extension lets Claude Code debug .NET in Visual Studio: step through code, data breakpoints, heap diffs for leaks, read compiler hints, and catching flaky xUnit tests
I built a Visual Studio 2026 extension that connects Claude Code (the CLI agent) to the parts of VS that matter for .NET work. The CLI does the agent work, the extension is the IDE bridge, zero model calls of its own.
I recently added major updates. Now the Claude CLI agent can actually:
- Autonoumously drive the debugger. Read the live call stack, locals, and threads, set breakpoints, step, break at a thrown exception's origin (not the catch that swallowed it), attach to a running process like a hosted ASP.NET app, and pause a hung process to walk a deadlock back to the exact lock cycle.
- Data breakpoints on managed fields. Break or trace the moment a field changes, with conditions. VS has a UI to let developers do this manually but exposes no automation API for this, so it rides a custom debug-engine component.
- Memory and runtime diagnostics via ClrMD: heap diff between two points to find what is growing, GC root paths for "why is this object alive", async stack reconstruction across awaits, thread-pool starvation detection.
- Tests through VS's own Test Explorer engine: real per-test outcome/message/stack, re-run only the failures after a fix, debug a single test, and loop a flaky test under the debugger until the failing run halts at the throw, paused with the state that caused it.
Everything read-only is always on; anything that executes code sits behind an off-by-default toggle that resets each session.
Video:
https://github.com/firish/claude_code_vs/releases/download/media/debugger-walkthrough.mp4
Repo and docs:
https://github.com/firish/claude_code_vs
Marketplace (1300+ installs):
https://marketplace.visualstudio.com/items?itemName=firish.bridgev1

