Skip to content

Commit e951a98

Browse files
Merge pull request #11307 from MicrosoftDocs/main639120601908923447sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents c7375f7 + f61ea66 commit e951a98

22 files changed

Lines changed: 102 additions & 28 deletions

docs/debugger/debug-with-copilot.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,27 @@ Copilot understands call stacks, frames, variable names, and values. As a result
4545

4646
In addition, Copilot provides more precise help for some targeted scenarios, such as those described in the following table.
4747

48+
:::moniker range="visualstudio"
49+
|Feature or scenario|Link|
50+
|-|-|
51+
|Debugger Agent|See [Agentic bug resolution with the Debugger Agent](#agentic-bug-resolution-with-the-debugger-agent) in this article. End-to-end agentic workflow that reproduces bugs, instruments your app, and validates fixes using live runtime data.|
52+
|Call stack analysis|See [Analyze call stack with Copilot](how-to-use-the-call-stack-window.md#analyze-call-stack-with-copilot). Get one-click analysis of what your thread is doing, including async flow explanations.|
53+
|Exceptions|See [Debug an exception with Copilot](#debug-an-exception-with-copilot) in this article. Help with exceptions includes help with deadlock detection errors.|
54+
|Variables|See [Get AI assistance](../debugger/autos-and-locals-windows.md#get-ai-assistance).|
55+
|LINQ query analysis|Hover over LINQ queries while debugging in the code editor to see return value. Select the **Analyze with Copilot** button for AI assistance. See [View return values of LINQ queries](../debugger/autos-and-locals-windows.md#view-return-values-of-linq-queries).|
56+
|Data tips|See [Get AI assistance with Data tips](../debugger/view-data-values-in-data-tips-in-the-code-editor.md#get-ai-assistance).|
57+
|Conditional breakpoints and tracepoints|See [Get suggestions with conditional breakpoints and tracepoints](#get-suggestions-with-conditional-breakpoints-and-tracepoints) in this article.|
58+
|Quick Actions (light bulb)|See [Get AI assistance with Quick Actions](../ide/quick-actions.md#get-ai-assistance).|
59+
|IEnumerable tabular visualizer|See [Get AI assistance](../debugger/view-data-in-tabular-visualizer.md#get-ai-assistance).|
60+
|Inline return values|See [View return values of method calls](../debugger/autos-and-locals-windows.md#view-inline-return-values-of-method-calls-in-the-code-editor).|
61+
|Inline values|See [View inline values](../debugger/autos-and-locals-windows.md#view-inline-values).|
62+
|Multithreaded debugging|See [Get AI assistance with Threads view](../debugger/using-the-parallel-stacks-window.md#get-ai-assistance).|
63+
|Unit testing|See [Get AI assistance to debug tests](../test/debug-unit-tests-with-test-explorer.md#get-ai-assistance-to-debug-tests)|
64+
|Inspect exceptions with repo context|See [Get AI assistance with repo context](../debugger/exception-helper.md#get-ai-assistance-with-repo-context)|
65+
|Troubleshooting breakpoints|See [Get AI assistance](/troubleshoot/developer/visualstudio/debuggers/troubleshooting-breakpoints#get-ai-assistance).|
66+
::: moniker-end
67+
68+
:::moniker range="vs-2022"
4869
|Feature or scenario|Link|
4970
|-|-|
5071
|Call stack analysis|See [Analyze call stack with Copilot](how-to-use-the-call-stack-window.md#analyze-call-stack-with-copilot). Get one-click analysis of what your thread is doing, including async flow explanations.|
@@ -61,6 +82,7 @@ In addition, Copilot provides more precise help for some targeted scenarios, suc
6182
|Unit testing|See [Get AI assistance to debug tests](../test/debug-unit-tests-with-test-explorer.md#get-ai-assistance-to-debug-tests)|
6283
|Inspect exceptions with repo context|See [Get AI assistance with repo context](../debugger/exception-helper.md#get-ai-assistance-with-repo-context)|
6384
|Troubleshooting breakpoints|See [Get AI assistance](/troubleshoot/developer/visualstudio/debuggers/troubleshooting-breakpoints#get-ai-assistance).|
85+
::: moniker-end
6486

6587
In most of these scenarios, you get targeted assistance by using the **Ask Copilot** ![Screenshot of Ask Copilot button.](../debugger/media/vs-2022/debug-with-copilot-ask-copilot-button.png) or **Analyze with Copilot** button. Copilot already knows the context for your questions. For example, it knows the current call stack, the code line you're asking about, and the name of the exception (if one occurred), so you don't need to provide context yourself in chat. Copilot also provides suggestions for the use of conditional breakpoints and tracepoints.
6688

@@ -252,6 +274,36 @@ The following simple example shows how to get AI assistance when you encounter a
252274

253275
:::moniker-end
254276

277+
:::moniker range="visualstudio"
278+
279+
## Agentic bug resolution with the Debugger Agent
280+
281+
The Debugger Agent provides an end-to-end agentic workflow that validates bugs against real runtime behavior instead of relying on static analysis. The experience walks you through a complete agentic loop: understanding and reproducing the issue, instrumenting the application, isolating the root cause, and validating the fix through live execution.
282+
283+
You can start from an issue in GitHub or Azure DevOps, or describe the bug in natural language. The Debugger Agent maps the problem to your local source code and guides you through resolution. You can interact with the agent during the debugging process to provide more input, discuss your theory, or refine the fix in real time.
284+
285+
To use the Debugger Agent:
286+
287+
1. Open the Copilot Chat window (**View > GitHub Copilot Chat**).
288+
1. Select **Debugger** from the mode dropdown in the lower-left corner of the chat window.
289+
1. Provide a GitHub or Azure DevOps issue link, or describe the bug in natural language.
290+
291+
<!-- TODO: Update screenshot when 18.5 releases -->
292+
:::image type="content" source="media/visualstudio/agent-picker.png" alt-text="Screenshot showing the agent picker with custom agents in Visual Studio.":::
293+
294+
The Debugger Agent works through the following steps:
295+
296+
- **Context injection** - Connects the issue or bug description to your local source code.
297+
- **Autonomous reproducer** - Analyzes the bug and, if reproduction steps are missing, creates a minimal scenario to trigger the failure.
298+
- **Hypothesis and instrumentation** - Generates failure hypotheses and instruments your app with tracepoints and conditional breakpoints to capture runtime state.
299+
- **Runtime validation** - Runs the debug session and analyzes live telemetry to isolate the root cause.
300+
- **Targeted correction** - Suggests a precise fix at the exact failure point rather than broad refactoring.
301+
- **Final human validation** - You rerun the scenario and confirm the fix in the live environment alongside the agent.
302+
303+
When in Agent mode in chat, you can also switch to the Debugger agent by using @debugger in the chat input. For more information on the Debugger Agent and other built-in agents, see [Use built-in and custom agents with GitHub Copilot](../ide/copilot-specialized-agents.md).
304+
305+
:::moniker-end
306+
255307
## Get suggestions with conditional breakpoints and tracepoints
256308

257309
Copilot gives you suggestions for [conditional breakpoints](../debugger/using-breakpoints.md#breakpoint-conditions) and [tracepoints](../debugger/using-tracepoints.md) that are specific to your code.

docs/debugger/debugger-feature-tour.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ Expand the **Exception Settings** node to see more options on how to handle this
256256
::: moniker range="visualstudio"
257257
## Get AI assistance
258258

259-
If you have [Copilot](../ide/visual-studio-github-copilot-extension.md), you can get AI assistance while you're debugging. For more information, see [Debug with Copilot](../debugger/debug-with-copilot.md). While debugging, you can also look for the **Analyze with Copilot** ![Screenshot of Analyze with Copilot button.](../debugger/media/visualstudio/debug-with-copilot-ask-copilot-button.png) button. In these scenarios, Copilot already knows the context for your questions, so you don't need to provide context yourself in Copilot chat.
259+
If you have [Copilot](../ide/visual-studio-github-copilot-extension.md), you can get AI assistance while you're debugging. For more information, see [Debug with Copilot](../debugger/debug-with-copilot.md). While debugging, you can also look for the **Analyze with Copilot** ![Screenshot of Analyze with Copilot button.](../debugger/media/visualstudio/debug-with-copilot-ask-copilot-button.png) button. In these scenarios, Copilot already knows the context for your questions, so you don't need to provide context yourself in Copilot chat.
260+
261+
For a more comprehensive agentic workflow, use the **Debugger Agent** to walk through end-to-end bug resolution, from reproducing an issue to validating the fix with live runtime data. For more information, see [Agentic bug resolution with the Debugger Agent](../debugger/debug-with-copilot.md#agentic-bug-resolution-with-the-debugger-agent).
260262
::: moniker-end
261263

262264
::: moniker range="vs-2022"

docs/debugger/exception-helper.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Inspect and break exceptions when debugging
33
description: Learn about the information that Visual Studio provides to help you debug exceptions, and how to selectively disable breaking on exceptions.
4-
ms.date: 01/06/2026
4+
ms.date: 04/13/2026
55
ms.topic: how-to
66
dev_langs:
77
- CSharp
@@ -96,6 +96,8 @@ When you encounter an exception:
9696
- Complex exceptions are analyzed with full context, connecting runtime behavior to historical patterns, so you can understand unexpected or incorrect values quickly.
9797
- By surfacing relevant fixes and insights automatically, Copilot saves time and reduces the trial-and-error often required to debug challenging issues.
9898

99+
For complex bugs that require end-to-end diagnosis beyond a single exception, you can use the Debugger Agent. The Debugger Agent provides an agentic workflow that reproduces, instruments, and validates fixes using live runtime data. For more information, see [Agentic bug resolution with the Debugger Agent](../debugger/debug-with-copilot.md#agentic-bug-resolution-with-the-debugger-agent).
100+
99101
::: moniker-end
100102

101103
## Share a debug session with Live Share

docs/debugger/find-your-debugging-task.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
metadata:
33
title: "FAQ - Debugger feature finder"
44
description: Review frequently asked questions to help you identify the Visual Studio debugger feature to help you debug your application.
5-
ms.date: "11/22/2024"
5+
ms.date: "04/13/2026"
66
ms.topic: faq
77
f1_keywords:
88
- "vs.debug.uiref"
@@ -206,3 +206,16 @@ sections:
206206
- **How do I fix an exception?**
207207
208208
See [Fix an exception](write-better-code-with-visual-studio.md#fix-an-exception).
209+
210+
- question: |
211+
AI-assisted debugging
212+
answer: |
213+
- **How can I get AI assistance while debugging?**
214+
215+
If you have Copilot, look for the **Analyze with Copilot** or **Ask Copilot** button in debugger windows like the Exception Helper, data tips, and variables windows. Copilot already knows your debugging context.
216+
See [Debug with Copilot](debug-with-copilot.md).
217+
218+
- **How do I use the Debugger Agent for end-to-end bug resolution?**
219+
220+
The Debugger Agent provides an agentic workflow that reproduces bugs, instruments your app, and validates fixes using live runtime data. Select **Debugger** from the mode dropdown in the Copilot Chat window and provide an issue link or describe the bug.
221+
See [Agentic bug resolution with the Debugger Agent](debug-with-copilot.md#agentic-bug-resolution-with-the-debugger-agent).
21.5 KB
Loading

docs/ide/copilot-specialized-agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Each built-in agent focuses on a specific developer workflow. These agents integ
7373

7474
### Use the @debugger agent
7575

76-
The @debugger agent helps you diagnose errors systematically by analyzing your debugging context.
76+
The @debugger agent helps you diagnose errors systematically by analyzing your debugging context. It also supports an end-to-end agentic workflow that reproduces bugs, instruments your app with tracepoints and conditional breakpoints, and validates fixes using live runtime data. For more information, see [Agentic bug resolution with the Debugger Agent](../debugger/debug-with-copilot.md#agentic-bug-resolution-with-the-debugger-agent).
7777

7878
**Example prompts**:
7979

164 KB
Loading
259 KB
Loading
37.3 KB
Loading
24.8 KB
Loading

0 commit comments

Comments
 (0)