Skip to content

Commit 30aab17

Browse files
authored
Merge pull request #49710 from wwlpublish/3a43d570c1788e5d992e209e91236ecf387f730e951c031dd423205958eba48f-live
Modules/M01-review-principles-code-debugging-exception-handling-csharp
2 parents ca790d0 + 9bf282b commit 30aab17

14 files changed

+118
-20
lines changed
484 KB
Loading

learn-pr/achievements/review-principles-code-debugging-exception-handling-c-sharp.svg

Lines changed: 85 additions & 0 deletions
Loading

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/1-introduction.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ title: Introduction
44
metadata:
55
title: Introduction
66
description: "Introduction"
7-
ms.date: 02/22/2024
7+
ms.date: 03/28/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
11+
ms.custom:
12+
- N/A
1113
durationInMinutes: 3
1214
content: |
1315
[!include[](includes/1-introduction.md)]

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/2-get-started-test-debug-exception.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ title: Get started with testing, debugging, and exception handling
44
metadata:
55
title: Get started with testing, debugging, and exception handling
66
description: "Get started with testing, debugging, and exception handling"
7-
ms.date: 02/22/2024
7+
ms.date: 03/28/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
11+
ms.custom:
12+
- N/A
1113
durationInMinutes: 7
1214
content: |
1315
[!include[](includes/2-get-started-test-debug-exception.md)]

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/3-examine-code-debug.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ title: Examine the code debugger approach to debugging code
44
metadata:
55
title: Examine the code debugger approach to debugging code
66
description: "Examine the code debugger approach to debugging code"
7-
ms.date: 02/22/2024
7+
ms.date: 03/28/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
11+
ms.custom:
12+
- N/A
1113
durationInMinutes: 5
1214
content: |
1315
[!include[](includes/3-examine-code-debug.md)]
@@ -21,7 +23,7 @@ quiz:
2123
explanation: "Correct. A debugger is a software tool uses an analytical approach to observe and control the execution flow of a program."
2224
- content: "A program that generates code automatically based on user input."
2325
isCorrect: false
24-
explanation: "Incorrect. Debuggers are used isolate logic issues in an application. Debuggers are not used to generate code."
26+
explanation: "Incorrect. Debuggers are used to isolate logic issues in an application. Debuggers are not used to generate code."
2527
- content: "A tool that helps developers write their code faster."
2628
isCorrect: false
2729
explanation: "Incorrect. Although code debuggers speed the debugging process and help to identify issues, they do not help with writing code."

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/4-examine-code-exception.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ title: Examine exceptions and how exceptions are used
44
metadata:
55
title: Examine exceptions and how exceptions are used
66
description: "Examine exceptions and how exceptions are used"
7-
ms.date: 02/22/2024
7+
ms.date: 03/28/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
11+
ms.custom:
12+
- N/A
1113
durationInMinutes: 6
1214
content: |
1315
[!include[](includes/4-examine-code-exception.md)]
@@ -18,7 +20,7 @@ quiz:
1820
choices:
1921
- content: "To ignore errors that occur in a program."
2022
isCorrect: false
21-
explanation: "Incorrect. Exceptions should be handled in code to correct error conditions if possible."
23+
explanation: "Incorrect. Exceptions should be handled in code to correct an error conditions if possible."
2224
- content: "To take corrective action when an error occurs in a program."
2325
isCorrect: true
2426
explanation: "Correct. The purpose of catching an exception is to take corrective action when an error occurs."

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/5-knowledge-check.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ title: Knowledge check
44
metadata:
55
title: Knowledge check
66
description: "Knowledge check"
7-
ms.date: 02/22/2024
7+
ms.date: 03/28/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
11+
ms.custom:
12+
- N/A
1113
durationInMinutes: 4
1214
quiz:
1315
title: "Check your knowledge"
@@ -30,7 +32,7 @@ quiz:
3032
explanation: "Correct. A debugger is a software tool uses an analytical approach to observe and control the execution flow of a program."
3133
- content: "A program that generates code automatically based on user input."
3234
isCorrect: false
33-
explanation: "Incorrect. Debuggers are used isolate logic issues in an application. They are not used to generate code."
35+
explanation: "Incorrect. Debuggers are used to isolate logic issues in an application. They are not used to generate code."
3436
- content: "A tool that helps developers write their code faster."
3537
isCorrect: false
3638
explanation: "Incorrect. Although code debuggers speed the debugging process and help to identify issues, they do not help with writing code."
@@ -49,7 +51,7 @@ quiz:
4951
choices:
5052
- content: "To ignore the errors that occur in a program."
5153
isCorrect: false
52-
explanation: "Incorrect. Exceptions should be handled in code to correct error conditions if possible."
54+
explanation: "Incorrect. Exceptions should be handled in code to correct an error conditions if possible."
5355
- content: "To generate other exceptions in a program."
5456
isCorrect: false
5557
explanation: "Incorrect. Exceptions can be thrown when an issue or error is detected, but the `catch` clause is not a tool for generating errors."

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/6-summary.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ title: Summary
44
metadata:
55
title: Summary
66
description: "Summary"
7-
ms.date: 02/22/2024
7+
ms.date: 03/28/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
11+
ms.custom:
12+
- N/A
1113
durationInMinutes: 1
1214
content: |
1315
[!include[](includes/6-summary.md)]

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/includes/1-introduction.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
2-
3-
4-
51
When you set out to develop an application, writing your code is just the first step. The process for verifying that your code works as expected begins shortly after the first lines of code are written. In software development, code verification includes testing, debugging, and exception handling.
62

73
Suppose you're developing an application. Implementing the logic for certain features turns out to be more complex than you expected. You're able to build and run the code, but you're seeing unexpected results and it's difficult to determine where the problems are being introduced. In addition, you've noticed that passing user supplied data as a parameter for certain method calls can result in runtime errors. If you don't find a better approach to debugging your code logic and managing runtime errors, you might not complete the project on time. When you ask colleague for advice, they remind you that Visual Studio Code provides debugging tools and that C# includes support for exception handling. You decide it's time for you to start learning about code debugging and exception handling.

learn-pr/wwl-language/review-principles-code-debugging-exception-handling-c-sharp/includes/2-get-started-test-debug-exception.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55

6+
67
Every software developer needs to complete some level of testing and debugging when they develop their code, and exception handling is often required. But how are these three tasks related and when should they be implemented?
78

89
## Testing, debugging, and exception handling

0 commit comments

Comments
 (0)