Visual Studio 18.5's Debugger Agent Turns Copilot Into a Live Bug-Hunting Partner
Visual Studio 18.5 GA ships a guided Debugger Agent workflow in Copilot Chat that forms a hypothesis, sets breakpoints, rides along through a repro, validates against runtime state, and proposes a fix.
The Visual Studio team shipped a new Debugger Agent workflow in Visual Studio 18.5 GA on April 15, 2026. If you have spent the last year asking Copilot “why is this null” and getting a confident guess that contradicted the actual call stack, this release is the correction. The agent is no longer a chatbot that reads your source files. It drives an interactive debug session, sets its own breakpoints, and reasons against live runtime state.
Static analysis was not enough
Earlier iterations of Debug with Copilot were helpful for exception assistance and “explain this stack frame” style prompts, but they operated on a frozen snapshot of your code. When the real fault lived in a race between two async continuations, or in state that only existed after the fifteenth click, a static read of MyService.cs simply could not see it. VS 18.5 closes that gap by letting the agent participate in the actual repro.
The four-phase loop
Once your solution is open, you switch Copilot Chat into Debugger mode and hand it a bug description. The workflow then walks through four phases in order:
- Hypothesis and preparation. The agent analyses the description plus the code and proposes a root cause theory. It then sets “intelligent breakpoints” on the suspect paths and offers to launch the project for you. If your startup is unusual, you can launch manually and let it attach.
- Active reproduction. The agent stays on the line while you click through the repro. It is watching runtime state as each breakpoint hits, not re-reading the file.
- Real-time validation. At each stop, it evaluates locals and the call stack to confirm or eliminate its hypothesis. Wrong guesses get discarded on evidence instead of being defended.
- The final fix. When the agent is confident it has found the cause, it proposes a code change. If you approve, it applies the edit and reruns the session to verify the bug is gone.
The supported scenarios in the 18.5 GA drop are “exceptions, logic inconsistencies, and state corruption.” Performance regressions and concurrency-only bugs are not on that list yet.
What a session looks like
A minimal walkthrough for a classic null-ref looks like this:
You: The app throws NullReferenceException when saving a new invoice
with no line items. Repro: open /invoices/new, click Save.
Agent: Hypothesis - Invoice.Total() dereferences LineItems before the
collection is initialised for empty invoices.
Setting breakpoints at InvoiceService.cs:42 and Invoice.cs:18.
Launching IIS Express on https://localhost:7080 ...
You run through the repro. The breakpoint at Invoice.cs:18 hits, the agent reads this.LineItems off the stack frame, sees null rather than an empty list, and confirms the hypothesis without asking you to step through anything. It then offers:
public decimal Total() =>
(LineItems ?? []).Sum(li => li.Quantity * li.UnitPrice);
Approve, and it reruns the scenario to confirm the exception is gone.
Why it matters
The interesting shift here is that the agent is grounded in runtime truth. You can still overrule it, ignore its breakpoints, and debug manually, which is the right default for anything security-sensitive or in unfamiliar code. But for the long tail of “I have a repro and a stack trace and need to bisect state,” the loop from bug report to verified fix gets dramatically shorter. Expect more of your debugging time to be spent reviewing the agent’s evidence instead of placing breakpoints yourself.
The feature is in VS 18.5 GA today. If you are still on 17.x or an earlier 18.x preview, the old chat-style Debug with Copilot is what you have. The guided workflow requires 18.5.