Skip to sessions and notes

These session notes are AI-generated and may contain mistakes. Verify important details against the original recording.

What's New in Visual Studio Debugging and Diagnostics

Harshida Hole

Session · 20:52 recording · 5 min read

At a glance

  • Three diagnostic paradigms: full agentic, connected diagnostics, and contextual in-IDE
  • Debugger Agent with live runtime context (call stacks, breakpoints, power stacks)
  • 4-stage Investigation Loop (Reproduce -> Investigate -> Form Hypothesis -> Verify)
  • Three investigation modes: Manual, Test-driven, and UI Automation (Insiders)
  • eShopOnWeb cart discrepancy bug solved via automated browser clicks & dynamic breakpoints

Executive Summary

Diagnosing software defects, memory leaks, and performance regressions is often the most time-consuming phase of the software engineering lifecycle. In this session, Harshida Hole unveiled how Visual Studio 2026 transforms diagnostic engineering through three distinct developer paradigms:

  1. Full End-to-End Agentic Diagnostics: A dedicated Debugger Agent with runtime context (call stacks, breakpoints, power stacks) executing a structured Investigation Loop powered by automated UI reproduction.
  2. Connected Diagnostics (CLI to IDE Handoff): Seamless bi-directional synchronization bridging terminal AI tools (Copilot CLI, Copilot App, VS Code) directly into Visual Studio's heavyweight profiling and tracing engines via launch-vs.
  3. Contextual In-IDE Diagnostics: Micro-agent integrations throughout the traditional debugging canvas, including Crash Dump Analysis with Copilot and PerfTips coupled with Profiler Agents enabling live Hot Reload optimizations during active debug breaks.

What's New in Visual Studio Diagnostics
What's New in Visual Studio Diagnostics

The Three Diagnostic Paradigms

flowchart TD
    A[Visual Studio Diagnostics 2026] --> B[1. End-to-End Agentic Workflow<br/>Debugger Agent + Investigation Loop]
    A --> C[2. Connected Diagnostics<br/>CLI / VS Code / Copilot App Handoff]
    A --> D[3. Contextual In-IDE Helpers<br/>Dump Debugging & PerfTips + Hot Reload]
    
    B --> B1[UI Automation Bug Repro]
    B --> B2[Runtime Breakpoint Hypothesis]
    B --> B3[Regression Test Suite Verification]
    
    C --> C1[launch-vs Synchronized Chat]
    C --> C2[Profiler Agent Benchmark Tracing]
    C --> C3[27% Optimization Gains]
    
    D --> D1[One-click Crash Dump Analysis]
    D --> D2[Inline PerfTip Profiler Agent]
    D --> D3[In-flight Hot Reload Fixes]

Three Diagnostic Scenarios
Three Diagnostic Scenarios


1. The Debugger Agent & Automated Investigation Loop

Unlike general-purpose coding agents that merely read static source code and compiler logs, the Visual Studio Debugger Agent possesses full live runtime context: active process state, managed call stacks, memory heap allocations, and thread state.

Debugger Agent Investigation Loop
Debugger Agent Investigation Loop

The 4-Stage Investigation Loop

Developers supply a bug description or an issue URL (GitHub Issue / Azure DevOps Work Item). The agent executes:

  1. Reproduce: Executes reproduction steps using chosen modality (Manual, Test-driven, or UI Automation).
  2. Investigate & Hypothesize: Formulates hypotheses regarding the root cause.
  3. Runtime Validation: Automatically injects conditional breakpoints and inspects locals/evaluations to confirm the hypothesis.
  4. Fix & Regression Verification: Generates the fix, verifies it against the existing test suite, and re-runs the reproduction steps to prove the defect is resolved.

Case Study: eShopOnWeb Cart Discrepancy Bug

Harshida demonstrated the agent resolving an eShopOnWeb bug where updating the cart quantity of a .NET Blocked Sweatshirt failed to update the cart total.

eShop Bug Scenario
eShop Bug Scenario

1. Automated UI Reproduction

The developer instructed the agent: "There is a pricing inconsistency in the cart total when changing item quantities." Selecting UI Automation Mode, the Debugger Agent autonomously launched the browser, navigated the storefront, added the item to the cart, changed the quantity to 3, and parsed the DOM to confirm the price discrepancy was successfully reproduced.

UI Automation Bug Reproduction
UI Automation Bug Reproduction

2. Dynamic Breakpoint Placement & Hypothesis Validation

To validate its hypothesis, the agent replayed the UI execution while setting a runtime breakpoint in the cart calculation service. It paused execution, validated variable values in the call stack, removed the breakpoint, and formulated the patch.

Runtime Breakpoint Hypothesis Validation
Runtime Breakpoint Hypothesis Validation

3. Patching and Regression Test Gate

Before calling the fix complete, the agent ran the solution's existing test suite to ensure the calculation change did not regress other shopping flows. It then relaunched the web application via UI automation and confirmed the cart total reflected the correct multi-item price.

Regression Testing and Verification
Regression Testing and Verification


2. Connected Diagnostics: Bridging Copilot CLI and Visual Studio

Developers increasingly begin investigations in lightweight terminal shells like Copilot CLI or VS Code before realizing they need deep CPU sampling, allocation profiling, or memory leak analysis.

Copilot CLI Performance Analysis
Copilot CLI Performance Analysis

Real-Time Session Synchronization (launch-vs)

Harshida started a performance investigation of SharpZipLib inside Copilot CLI. After static analysis suggested an inefficient compression loop, she issued launch-vs:

  • Visual Studio launched immediately with the target file and benchmark opened.
  • Bi-Directional Chat Sync: The Visual Studio Copilot Chat window was in exact, real-time synchronization with the Copilot CLI prompt history and memory.

Connected Diagnostics CLI and VS Sync
Connected Diagnostics CLI and VS Sync

Profiler Agent: Automated Benchmark Tracing & 27% Speedup

In Visual Studio, Harshida engaged the Profiler Agent:

  1. The agent executed BenchmarkDotNet and collected baseline ETW/ETL diagnostic traces.
  2. It analyzed the hot execution path, identifying excessive buffer allocations.
  3. It generated optimized span-based buffer code, rebuilt the project, and collected a second comparative trace.
  4. Results: The optimization delivered a 27% execution time reduction on .NET 6 (and 13% on .NET Framework).
  5. When Visual Studio was closed, Copilot CLI received the complete structured summary and benchmark comparison data.

Profiler Agent 27% Speedup
Profiler Agent 27% Speedup


3. Contextual In-IDE Diagnostics

For developers operating manually inside Visual Studio, new AI capabilities reduce diagnostic friction at the point of need:

Crash Dump Debugging with Copilot

Analyzing complex production crash dumps (.dmp) traditionally required WinDbg commands (!analyze -v, !clrstack). Visual Studio now features a Debug with Copilot action on the dump summary page:

  • Parses thread call stacks, exception records, and OS crash signals automatically.
  • Explains the probable crash cause and highlights the responsible source lines directly in the Copilot Chat pane.

Dump Debugging with Copilot
Dump Debugging with Copilot

PerfTips + Profiler Agent with Hot Reload

When stepping through code during a debug session, Visual Studio displays inline PerfTips indicating elapsed execution time (e.g., Elapsed: 284ms).

  • Clicking the PerfTip exposes an Analyze with Copilot action, which invokes the Profiler Agent on that specific code block.
  • The agent analyzes the algorithmic complexity, suggests an optimized implementation, and allows applying the fix immediately via Hot Reload without terminating the active debugging session.

PerfTips Profiler Agent Hot Reload
PerfTips Profiler Agent Hot Reload


Summary of Diagnostic Capabilities

Capability Previous Visual Studio Visual Studio 2026 Architecture
Agent Autonomy Chat code generation only Full Debugger Agent with runtime call stack / breakpoint awareness
Bug Investigation Manual developer stepping Automated Investigation Loop (UI Automation, Tests, Manual)
Terminal Integration Disconnected CLI and IDE Connected Diagnostics (launch-vs) with bi-directional chat sync
Performance Profiling Manual trace collection & visual inspection Profiler Agent automated trace-diff-optimize loop
Crash Dump Analysis WinDbg / SOS manual commands One-click Debug with Copilot dump analysis
Inline Perf Guidance Static elapsed time badge PerfTip -> Profiler Agent -> Hot Reload in-flight optimization