English
Topic 6. Debugging and exception handling
Goal: become familiar with Visual Studio 2026 debugging tools and the .NET exception mechanism; learn to find logic errors using breakpoints, stepping, and debugger windows; master handling exceptions with try/catch/finally, throwing exceptions, and reporting errors through exit codes.
Lecture contents
- Errors and the debugger — Types of errors · The Visual Studio debugger · Debugger windows · Conditional breakpoints and tracepoints
- Debug.Assert and exception handling — The Debug class: WriteLine and Assert · Exceptions · The try/catch/finally statement
- Throwing exceptions and strategy — Throwing exceptions · Unhandled exceptions and exit codes · When to use exceptions
- Examples and common mistakes — Example programs · Common mistakes