Stepping (debugging)

From Wikipedia, the free encyclopedia

Stepping refers to the very common debugging method of executing code one line at a time. The person debugging may examine the state of the program, machine, and related data before and after execution of a particular line of code. This allows the person to evaluate the effects of that instruction in isolation and thereby gain insight into the behavior (or misbehavior) of the program. Nearly all modern IDEs and debuggers support this mode of execution.

Historically, stepping also referred to the related, more microscopic, but now obsolete method of debugging code by stopping the processor clock and manually advancing it one cycle at a time. For this to be possible, three things are required:

  • A control that allows the clock to be stopped.
  • A second control that allows the stopped clock to be manually advanced.
  • Some means of recording the state of the processor after each cycle.

On some IBM System 360 processors, these facilities were provided by front panel switches and banks of neon lights. Other systems such as the PDP-11 provided similar facilities, again on some models. The precise configuration was also model-dependent. It would not be easy to provide such facilities on LSI processors such as the Intel x86 and Pentium lines, owing to cooling considerations.

[edit] External links and references