How Do I Search For and Fix Errors in a Structured Way?
摘要
Errors are the programmer’s worst enemy. No matter how carefully you work, errors always creep in. Therefore, we need to discuss how to find errors in your code during the development of your program and how, when you finally have an executable program, to deal with errors that occur during runtime (for example, when the user enters "wrong" information). Fortunately, there are language elements, development tools, and strategies that can help you find and fix errors, or at least deal with them in a controlled manner. The process of understanding the sources of errors is called debugging and is the main topic of this chapter.