39 compiler-powered tools that give AI assistants semantic understanding and runtime debugging of your .NET codebase. Not grep. Not regex. Roslyn + the Visual Studio Debugger.
What can your AI assistant actually do with each approach?
| Capability | AI Agent Alone (grep/filesystem) |
VS-MCP (Roslyn + Debugger) |
Other MCP Servers (file-based) |
|---|---|---|---|
| Find symbol by name | &x26A0; text match | ✓ semantic | &x2717; |
| Go to definition | &x26A0; heuristic | ✓ exact | &x2717; |
| Find all usages | &x26A0; grep (noisy) | ✓ compiler-verified | &x2717; |
| Inheritance hierarchy | &x2717; | ✓ full tree | &x2717; |
| Call graph | &x2717; | ✓ callers + callees | &x2717; |
| Safe rename | &x2717; text replace | ✓ Roslyn refactor | &x2717; |
| Runtime debugging | &x2717; | ✓ breakpoints + step + inspect | &x2717; |
| Attach to Docker/WSL | &x2717; | ✓ transports | &x2717; |
| Async test execution | &x26A0; CLI only | ✓ with status | &x2717; |
| Path WSL ↔ Windows | &x2717; manual | ✓ automatic | &x2717; |
| Build solution | ✓ | ✓ structured | ✓ |
Same question. Dramatically different answers.
$ grep -rn "WhisperFactory" --include="*.cs" src/WhisperFactory.cs:16: public class WhisperFactory src/WhisperFactory.cs:22: // WhisperFactory config src/WhisperFactory.cs:45: static WhisperFactory() src/Extensions.cs:12: new WhisperFactory() src/Tests/FactoryTests.cs:8: WhisperFactory sut; src/Tests/FactoryTests.cs:15: new WhisperFactory(cfg) src/Tests/MockFactory.cs:4: // WhisperFactory mock → 7 matches. Which is the definition? → What namespace? What interfaces? → What inherits from it? → ¯\_(ツ)_/¯
FindSymbols("WhisperFactory") Found: WhisperFactory Type: Class (Named Type) Namespace: Whisper.net File: WhisperFactory.cs Position: Line 16, Column 21 → 1 call. Exact answer. → Knows it's a class → Knows the namespace → Can now GetInheritance, FindUsages...
$ sed -i 's/ProcessDocument/HandleDocument/g' **/*.cs &x2717; ProcessDocumentAsync → HandleDocumentAsync (BROKEN!) &x2717; "ProcessDocument" in log strings (WRONG!) &x2717; IProcessDocument interface (MISSED!) &x2717; XML doc references (STALE!) → Text replace doesn't understand symbols → Breaks method names that START with same text → Changes strings that shouldn't change → Misses interface declarations
RenameSymbol("ProcessDocument", "HandleDocument") ✓ Renamed method: ProcessDocument → HandleDocument ✓ Updated 23 call sites across 8 files ✓ Updated interface declaration ✓ ProcessDocumentAsync untouched (different symbol) ✓ String literals untouched ✓ Compiler verification: 0 errors → Roslyn knows exactly what IS and ISN'T the same symbol. Safe. Complete. Verified.
12 powered by Roslyn. 8 for infrastructure. Stable and production-ready.
Set breakpoints. Step through code. Inspect variables. Attach to Docker and WSL. All from your AI assistant, using the Visual Studio debugger.
AI reads the code, guesses the issue: "Based on reading the code, it might be because the order.Items collection could be null. Try adding a null check on line 42." → Reading code. Guessing. Suggesting blind fixes. → Can't see actual runtime values. → Can't verify the hypothesis. → The real bug might be somewhere else entirely.
breakpoint_set("OrderService.ProcessOrder") debug_start → poll debug_get_mode → "Break" debug_get_locals: order.Items = List<Item>[3] ✓ not null order.Status = "Cancelled" ← THIS! validator = null ← not injected debug_evaluate("order.Items[0].Price") → 0.00 → Actual runtime values. Not guessing. → Found 2 real issues in 10 seconds. → Status is "Cancelled" AND validator is null.
1. debug_list_processes() → see what's running 2. debug_attach(processName: "MyApp") → attach debugger 3. debug_break() → pause the app 4. debug_get_callstack() → see where we are 5. debug_get_locals() → see all variables 6. debug_evaluate("request.Url") → drill into values 7. debug_step(direction: "over") → step forward 8. debug_stop() → detach when done
1. debug_list_transports() → verify Docker transport 2. debug_list_processes( transport: "Docker (Linux Container)" qualifier: "my-container") → find the process 3. debug_attach(processName: "dotnet", transport: "Docker (Linux Container)", qualifier: "my-container") → attached! 4. debug_get_callstack() → debug_get_locals() → investigate
1. breakpoint_set(functionName: "MyService.Process") 2. Ask user: "Right-click the failing test → Debug Test" 3. poll debug_get_mode() → "Break" (hit!) 4. debug_get_callstack() → exact code path 5. debug_get_locals() → variable values 6. debug_step(direction: "over") → step to see what happens 7. "Found the bug: validator was null because DI was misconfigured"
Complete reference for AI agents: all 19 tools, 10 workflows, Docker & WSL setup, polling patterns, and best practices. Download the .md file and add it to your AI's context.
Not demos. Enterprise .NET development.
"What does AuthenticateUser call, and who calls it?" — instant call graph. No reading 50 files.
GetMethodCallers + GetMethodCallsRename symbols across your entire solution with compiler-verified safety. No broken references.
RenameSymbol"What implements IDocumentService?" — full inheritance tree with base types, interfaces, and derived classes.
GetInheritanceGo to definition, find all usages, get document outline — the same intelligence as F12 and Shift+F12.
FindSymbolDefinition + FindSymbolUsagesRun tests asynchronously with real-time status updates. Filter by name, class, or namespace.
ExecuteAsyncTestAI tools run in WSL. Your code is on Windows. VS-MCP translates paths seamlessly.
TranslatePathClone a library's source from GitHub, open it in a second VS instance on its own port. Your AI now traces calls and patterns across your code AND the library code.
Your AI sets breakpoints, hits them, inspects locals, evaluates expressions, steps through code — all through the VS debugger. No guessing.
debug_get_locals + debug_step + debug_evaluateAttach the debugger to processes running inside Docker containers or WSL. Same tools, different transport.
debug_attach + debug_list_transportsAny MCP-compatible client. Any .NET solution.
Give it the same compiler intelligence and debugger access you use every day.
Visual Studio 2022 & 2026 · Free · Open Protocol