Programmers spend considerable time debugging code. Symbolic debuggers provide some help but the task remains complex and difficult. Other than breakpoints and tracing, these tools provide little highlevel help. Programmers must perform many tasks manually that the tools could perform automatically, such as finding which statements in the program affect the value of an output variable for a given test case, and what was the value of a given variable when the control last reached a given program location. If debugging tools provided explicit support for these tasks, the debugging process could be automated to a significant extent.In this paper we present a debugging model, based on dynamic program slicing and execution backtracking techniques, that easily lends itself to automation. This model is based on experience with using these techniques to debug soflware. We also present a prototype debugging tool, SPYDER, that explicitly supports the proposed model, and with which we are performing further debugging research. * The figures are X Window System window dumps of our prototype debugging tool, SPYDER, in operation. t A test case consists of a specific set of run-time input values. $ We will refer to this test case as the test case no. 1 in later sections. DEBUGGING WITH DYNAMIC SLICING AND BACKTRACKING :b", i + l ) t 1 doppsd at. l l m 43. > c l s s > clear > dyaric prop.= slice m "areaat lim 43 Currat Teatcsw It: 1 * 591 Figure 1. Dynamic program slice with respect to area on line 43 during the second loop iteration for test case no. I H . AGRAWAL, R. A. DEMILLO AND E. H. SI'AFFORD * SPYDER indicates the next statement to be executed by an arrow in the left margin of the code window. See, e.g., Figure 4.