Introduction
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.
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.
In this module, you learn the difference between testing, debugging, and exception handling. You examine the code debugging process and the benefits provided by code debuggers. You also learn about exceptions and how exceptions are used in an application.
By the end of this module, you'll be able to explain the benefits of code debuggers and exception handling.
Learning objectives
In this module, you will:
- Review the responsibilities for software testing, debugging, and exception handling.
- Examine the code debugging process and the benefits provided by code debugger tools.
- Examine what an exception is and the options for managing exceptions in your code.
Prerequisites
- An installation of Visual Studio Code that's configured for C# application development.
- Ability to develop C# console applications that implement business logic using iteration statements, selection statements, and custom methods.