Chapter 25: Debugging
To the uninitiated, debugging can seem somewhat like a black art. On the contrary, it’s actually one of the best skills you can have as a developer, though it’s rarely taught to novice coders, which I think is a tragic missed opportunity. All beginning coders make mistakes, and knowing about debugging will enable you to find and correct those mistakes much faster than just staring at the code and hoping the bug will reveal itself.
By the end of this chapter, you’ll understand the difference between a compile-time error and a runtime error, you’ll know how to set breakpoints in your code, and you’ll know how to step through the lines of your program one at a time to help you root out hard-to-find bugs.