Tracing execution

Now that you have executed TWORD to the first breakpoint, you can trace the execution one line at a time by pressing F8 or by clicking on the Step-Into button.  When you press F8, the debugger runs the execution line and stops at the beginning of the next line.

If the program produced any screen output, you can check it by clicking on the Console on Top button.  Since the program displays the first line of text from the data file, the bug is probably not in the screen output.

Perhaps there is something wrong with that INSTR function call?  You could not check the value of the variable position while the breakpoint line was highlighted, because the breakpoint line had not yet executed.  After pressing F8 and executing the breakpoint line, the value of the variable position should be known.  The value of position is critically important, so let's check it.


Next See: Evaluating a variable