You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/debugger/debug-with-copilot.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Debug with GitHub Copilot
3
3
description: Use Copilot to help debug your apps and provide performance insights.
4
-
ms.date: 10/29/2024
4
+
ms.date: 1/27/2025
5
5
ms.topic: how-to
6
6
dev_langs:
7
7
- CSharp
@@ -23,14 +23,7 @@ monikerRange: '>= vs-2022'
23
23
24
24
In this article, you'll learn how to debug more efficiently using GitHub Copilot. Copilot can provide code fixes along with in-depth analysis and explanations of how code works. It helps with proposed fixes to bugs, and explains things such as exceptions. Copilot understands call stacks, frames, variable names, and values. As a result, you can interact with the debugger-aware AI to ask detailed questions related to your code and to debugging issues in general.
25
25
26
-
In addition, Copilot provides more precise help for some targeted scenarios, such as the following:
27
-
28
-
- Exceptions
29
-
- Variables
30
-
- Deadlocks
31
-
- Quick Actions (light bulb)
32
-
33
-
To get AI assistance while you're debugging in these scenarios, look for the **Ask Copilot** button. In these scenarios, Copilot already knows the context for your questions. For example, it knows the current call stack, the code line you are 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.
26
+
In addition, Copilot provides more precise help for some targeted scenarios, such as Exceptions, and all those described in [Targeted scenarios for AI assistance](#targeted-scenarios-for-ai-assistance). In most of these scenarios, look for the **Ask Copilot** button. In these scenarios, Copilot already knows the context for your questions.
34
27
35
28
For more information on GitHub Copilot Completions in Visual Studio, see [About GitHub Copilot Completions in Visual Studio](../ide/visual-studio-github-copilot-extension.md).
36
29
@@ -46,7 +39,7 @@ To get started, you need:
46
39
> [!NOTE]
47
40
> If you experience authentication issues after installing the extension, see [Troubleshooting authentication issues with GitHub Copilot Chat](https://docs.github.com/en/copilot/troubleshooting-github-copilot/troubleshooting-authentication-issues-with-github-copilot-chat).
48
41
49
-
## Get AI assistance to debug your app
42
+
## Debug using Copilot
50
43
51
44
The following simple example shows how to get AI assistance using the inline Chat view.
52
45
@@ -131,7 +124,7 @@ The following simple example shows how to get AI assistance using the inline Cha
131
124
132
125
1. Choose **Cancel** so we can continue learning other features of Copilot in the next section.
133
126
134
-
## Get AI assistance for an exception
127
+
## Debug an exception with Copilot
135
128
136
129
The following simple example shows how to get AI assistance when you encounter an exception and how to quickly update your code based on AI-suggested fixes.
137
130
@@ -167,7 +160,7 @@ The following simple example shows how to get AI assistance when you encounter a
167
160
168
161
This time, no exception occurs. It has been fixed!
169
162
170
-
## Get AI assistance with conditional breakpoints and tracepoints
163
+
## Get suggestions with conditional breakpoints and tracepoints
171
164
172
165
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.
173
166
@@ -215,14 +208,21 @@ In this example, we show AI suggestions for a conditional breakpoint. For tracep
215
208
216
209
When the debugger pauses at the breakpoint, check the value of `item` and verify that the current value is `Fred`.
217
210
218
-
## Get AI assistance in the IEnumerable tabular visualizer
219
-
220
-
For AI assistance for the IEnumerable tabular visualizer, see [Modify the visualizer expression](../debugger/view-data-in-tabular-visualizer.md#modify-the-expression-in-the-ienumerable-visualizer).
211
+
## Targeted scenarios for AI assistance
221
212
222
-
## Get AI assistance for auto insights
213
+
Copilot understands call stacks, frames, variable names, and values. As a result, you can interact with the debugger-aware AI to ask detailed questions related to your code and to debugging issues in general.
223
214
224
-
In addition to interactive debugging assistance, Copilot provides detailed information in the CPU Usage [Auto Insights](../profiling/cpu-insights.md). It provides information and insights related to a set of specific performance insights. With Copilot, ask questions about functions on the identified hot paths in your code, which can help you produce more efficient or cost-effective code.
215
+
In addition, Copilot provides more precise help for some targeted scenarios, such as those described in the following table.
225
216
226
-
The **Ask Copilot** button appears even if no specific performance insights are identified. Select **Ask Copilot** to learn from Copilot and start asking questions.
217
+
|Scenario|Link|
218
+
|-|-|
219
+
|Exceptions|See [Debug an exception with Copilot](#debug-an-exception-with-copilot) in this article. Help with exceptions includes help with deadlock detection errors.|
220
+
|Variables|See [Debug using Copilot](#debug-using-copilot) in this article.|
221
+
|Conditional breakpoints and tracepoints|See [Get suggestions with conditional breakpoints and tracepoints](#get-suggestions-with-conditional-breakpoints-and-tracepoints) in this article.|
222
+
|Quick Actions (light bulb)|See [Get AI assistance with Quick Actions](../ide/quick-actions.md#get-ai-assistance).|
223
+
|IEnumerable tabular visualizer|See [Modify the visualizer expression](../debugger/view-data-in-tabular-visualizer.md#modify-the-expression-in-the-ienumerable-visualizer).|
224
+
|Inline return values|See [View return values of method calls](../debugger/debugger-feature-tour.md#view-return-values-of-method-calls).|
|Auto insights for profiling|See [Get AI assistance with Auto insights](../profiling/cpu-insights.md#get-ai-assistance).|
227
227
228
-
[](../debugger/media/vs-2022/debug-with-copilot-top-insights.gif#lightbox)
228
+
In most of these scenarios, you get targeted assistance by using the **Ask Copilot** button. Copilot already knows the context for your questions. For example, it knows the current call stack, the code line you are 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.
Copy file name to clipboardExpand all lines: docs/debugger/debugger-feature-tour.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "First look at the debugger"
3
3
description: Get started debugging your applications by using the Visual Studio debugger and see what your code is doing while it runs.
4
4
ms.topic: conceptual
5
-
ms.date: 11/5/2024
5
+
ms.date: 1/27/2025
6
6
helpviewer_keywords:
7
7
- "debugger"
8
8
author: mikejo5000
@@ -190,6 +190,9 @@ Starting in Visual Studio 2022 version 17.12 Preview 3, you can also view return
190
190
191
191
[](../debugger/media/vs-2022/view-return-values.png#lightbox)
192
192
193
+
With Copilot enabled, you can also get targeted assistance related to the inline return value by using the Ask Copilot button that appears in the data tip for the return value.
194
+
195
+
[](../debugger/media/vs-2022/view-return-values-copilot.png#lightbox)
Copy file name to clipboardExpand all lines: docs/debugger/using-the-parallel-stacks-window.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ Icon|Description|
86
86
||Indicates the deadlocked node.|
87
87
||Indicates that the current stack frame has additional information such as Waiting on, Waiting on lock, owned by, etc. |
88
88
||Indicates that the current task is in blocked/waiting state, etc. |
89
-
||Indicates that the currently running task.|
89
+
||Indicates the currently running task.|
Copy file name to clipboardExpand all lines: docs/extensibility/visualstudio.extensibility/editor/editor-concepts.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,14 @@ The Visual Studio Editor extensibility object model is composed of a few integra
22
22
23
23
- This object is immutable and will never change after it is created.
24
24
- You can use `ITextViewSnapshot.GetTextDocumentAsync()` to get the content from the document. Calling this method is expensive and only should be done if you need the document content.
25
-
-`ITextViewSnapshot` can't be changed directly. All changes are requested via mutation. See [Make changes in a text document from an extension](editor.md#make-changes-in-a-text-document-from-an-extension).
25
+
-`ITextViewSnapshot` can't be changed directly. All changes are requested via mutation. See [Make changes in a text document from an extension](./walkthroughs/editing-text.md).
26
26
27
27
## ITextDocumentSnapshot
28
28
29
29
[ITextDocumentSnapshot](/dotnet/api/microsoft.visualstudio.extensibility.editor.itextdocumentsnapshot) contains the content of the text document from a point in time or version.
30
30
31
31
- This object is immutable and will never change after it is created.
32
-
-`ITextDocumentSnapshot` can't be changed directly. All changes are requested via mutation. See [Make changes in a text document from an extension](editor.md#make-changes-in-a-text-document-from-an-extension).
32
+
-`ITextDocumentSnapshot` can't be changed directly. All changes are requested via mutation. See [Make changes in a text document from an extension](./walkthroughs/editing-text.md).
33
33
34
34
If you're familiar with legacy Visual Studio extensions, [ITextDocumentSnapshot](/dotnet/api/microsoft.visualstudio.extensibility.editor.itextdocumentsnapshot) is almost the same as
35
35
[ITextSnapshot](/dotnet/api/microsoft.visualstudio.text.itextsnapshot) and supports most of the same methods for accessing the text.
0 commit comments