From the course: Debugging in C#
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
The debugging process
- [Instructor] In debugging, we usually have a strategy for tackling and fixing bugs. We don't just go into the code and start changing a bunch of stuff. The hardest bugs to fix are the ones you can't find, because if you can't find it and understand it, you can't figure out how to fix it. This means the first step in debugging is often reproducing the problem. Once you can reproduce the problem, you have access to the problem and can dive in for more information. Next, if you are the person that has found a bug, try to describe the bug in as much detail as you can. Explain what the given input was, what the output, and what the output should've been. Sometimes, you may find the bug, but it's in a different part of the program, and someone else has to fix it. This means detailing the error as much as possible is extremely important. If you are the person debugging the program, then you'll need access to the source code. The next step is to create a snapshot of where the bug appears in…
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
-
-
-
-
-