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: lab/part07-debugging-with-copilot.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
3
3
In this section, you'll learn how to use Copilot to debug an exception in your application.
4
4
5
-
1.[] Debug the **AppHost** project if it isn't yet, and open the **store** from teh .NET Aspire dashboard.
5
+
1.[] Debug the **AppHost** project if it isn't yet, and open the **store** from the .NET Aspire dashboard.
6
6
1.[] Click on the **Go to About** button in the navigation menu.
7
7
1.[] Observe that an exception occurs, and the application crashes.
8
-
1.[] Press the **Ask Copilot** option in the pop up.
8
+
1.[] Press the **Analyze with Copilot** option in the pop up.
9
9
10
-

10
+

11
11
12
12
1.[] Review how Copilot brings in debugger information, including stack traces and variable states.
13
13
1.[] Note how Copilot recommends a fix for the issue or provides code suggestions to resolve it.
@@ -18,7 +18,7 @@ In this section, you'll learn how to use Copilot to debug an exception in your a
18
18
19
19
In this subsection, you'll learn how to use Copilot to analyze variables using watch windows and visualizers.
20
20
21
-
1.[] Open the **Products.razor** file again from the **Products**projet.
21
+
1.[] Open the **Products.razor** file again from the **Products**project.
22
22
1.[] Add a breakpoint at the end of the **OnInitializedAsync** method.
23
23
1.[] Debug the **TinyShop.AppHost** and open the **store** from the .NET Aspire dashboard, and navigate to the **Products** page.
24
24
1.[] When the breakpoint is hit, hover over the **imagePrefix** variable.
@@ -34,12 +34,10 @@ In this subsection, you'll learn how to use Copilot to analyze variables using w
34
34

35
35
36
36
1.[] Use the visualizer to inspect the contents of the **products** collection.
37
-
1.[] Click the sparkle button and, in natural language, type: `Products that have the name outdoor in them and are under 40 dollars`
37
+
1.[] Click the Generate expression button and, in natural language, type: `Products that have the name outdoor in them and are under 40 dollars`
38
38
1.[] Observe how Copilot generates the appropriate expression automatically.
39
39
40
-

41
-
42
-
1.[] Click **Continue in Chat** to have Copilot provide the equivalent LINQ query for the same filter criteria.
40
+

43
41
44
42
**Key Takeaway**: Copilot can enhance debugging by providing detailed insights into variables through watch windows and visualizers. Copilot can simplify complex debugging tasks by generating expressions and LINQ queries based on natural language input.
0 commit comments