From the course: Debugging in C#
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Beginner debugging code challenge
(upbeat electronic music) - [Instructor] It's time to practice your debugging skills with this code challenge. Be sure to use all the tools you've learned so far, including breakpoints, the call stack, debug mode, and more. For this challenge, you will be debugging some code that finds the minimum value in a given array. In this program, we create a variable called numbers and feed it into the findMin function. FindMin contains all of the logic for getting the item with the least value from the array. At the end, we print the returning value. Jumping into Visual Studio Code, we can look at the program we are going to debug. First, we have the main method where we initialize the number's array. Then we create a variable called Min that's an integer and store the value that findMin returns given the argument numbers. The logic for findMin is up here. Next, we print out Min to the console so that variable that has the value findMin returns. Be sure to check out the exercise files to get…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is debugging?2m 1s
-
(Locked)
What is a print statement?2m 1s
-
(Locked)
What is a breakpoint?5m 59s
-
(Locked)
Inspecting values of variables4m 28s
-
(Locked)
Execution in debug mode3m 40s
-
(Locked)
The debugging process2m 11s
-
(Locked)
Beginner debugging code challenge1m 13s
-
(Locked)
Beginner debugging code challenge: Solution6m 45s
-
-
-
-
-