Learn how to find and solve all of the errors in the previous code by using breakpoints, the call stack, and the debug window. Also, discover which errors require more time and energy to solve.
(upbeat music) … - [Woman] In this challenge, we have a program … that attempts to print the numbers … one through a hundred with some exceptions. … For multiples of three, the program prints 'fizz' … instead of the number. … And for multiples of five, it prints 'buzz'. … For numbers which are multiples … of both three and five, it prints 'fizzbuzz.' … Let's debug it. … The first thing we're going to do is … run the program to see what the actual output is, … and if we can even run it. … Dragging this up, we can see the contents … of what the program outputted, … so for zero, we get 'fizz,' … for three we get 'fizz,' … for five we get 'buzz,' … and this is good because here, … if it's a multiple of three, we want to print 'fizz.' … And, if it's a multiple of five, … we do want to print 'buzz.' … Now, for that multiple of fifteen, … we print 'fizz,' we don't print 'fizzbuzz.' … And if we scroll down to thirty, … we again print 'fizz,' instead of 'fizzbuzz.' … And this is what we should be printing. …
Author
Released
4/23/2019- Debugging defined
- Working with breakpoints
- Inspecting values of variables
- Defensive programming
- Common C# errors
- Debugging challenges
Skill Level Beginner
Duration
Views
Related Courses
-
Object Oriented Programming with C#
with Anton Delsink4h 7m Intermediate -
Learning C#
with Alexander Zanfir3h 4m Beginner -
Nail Your C# Developer Interview
with Reynald Adolphe1h 17m Beginner -
C# Design Patterns: Part 1 (2016)
with Reynald Adolphe1h 22m Intermediate
-
Introduction
-
Debugging in C#45s
-
-
1. Basics of Debugging
-
What is debugging?2m 1s
-
What is a breakpoint?5m 59s
-
Execution in debug mode3m 40s
-
The debugging process2m 11s
-
-
2. More Debugging Tips and Tricks
-
Covering edge cases3m 57s
-
Defensive programming3m 13s
-
Side effects3m 57s
-
-
3. Common Errors in C#
-
NullReferenceException4m 50s
-
IndexOutOfRangeException6m 10s
-
Logical errors5m 56s
-
-
4. Practice Debugging C# Programs
-
Logical code challenge3m 23s
-
Conclusion
-
Next steps43s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Basic code challenge: Solution