This article will take about 1 minute to read.
Most developers start out learning a simple hello world program in their given language. As they progress, their code gets more and more complicated. With this increased complexity comes risk, that your changes will not be doing everything that you intend them to do.
If you are on a professional engineering team, there will be a couple of different lines of defense, even before you pass your changes to QA:
When writing software, bugs are unavoidable. Once we’ve come to accept the fact that our code is buggy, we need to take steps to diagnose the problem so that we can correct it.
print
statements to inspect the current state of your program, but that is not always feasible. Debugging
is a more advanced method of gathering information within a program that is already running.