The Step, Crash method

When a program is flat out crashing, this is easy to debug tothe location of the fault, even if this is a program you have never worked on before.Use the step, crash method. The basic operation here is

First single step over procedures until you crash keeping a mentalnote of where you were. When you step and the program crashes, restart and get tothe procedure call where you crashed. Now repeat the following steps.

  1. Step into the procedure.
  2. Place a breakpoint here. You may want to remove previous breakpoints saved.
  3. Now single step over procedures until you crash. Remember where you were. If you are traveling great distances you may want to save a breakpoint occasionally to make it easier to get back to the crash point.
  4. When you crash stepping over a procedure, restart and execute back to the call that crashed. Your saved breakpoint(s) help here.
  5. Repeat until you get to a point where the crash occurs without stepping over one of your procedure calls. Now you are most likely in the area of the bug. Now you need to figure out what the actual bug is.