CHAPTER 4 Reproducing Problems

The first step in debugging is to reproduce the problem in question—that is, to create a test case that causes the program to fail in the specified way. The first reason is to bring it under control, such that it can be observed. The second reason is to verify the success of the fix. This chapter discusses typical strategies for reproducing the operating environment, the history, and the problem symptoms.

4.1 THE FIRST TASK IN DEBUGGING

Once a problem report is in the problem database, or once a test has failed, the problem will eventually be processed by some programmer in order to fix it. The programmer’s first task (or, more precisely, the first task of any debugging activity) is to reproduce the problem

Get Why Programs Fail, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.