Stepping |
Top Previous Next |
The following commands in the Debug menu control stepping into, through and out of various sections of your code:

A step is an instruction to move the program pointer to another line in source code. Stepping allows you to execute your code in a very controlled way, and work your way along the program in a pace which you can analyze and understand.
|
Step Into: Steps through your code line by line. When the program pointer reaches a procedure call, you will actually see it step into this procedure (hence, the name). You could then see the inner workings of this procedure as it is being executed, line by line. |
|
Step Over: Steps through your code line by line. When the program pointer reaches a procedure call, it executes this entire procedure at once, then stops at the next line after the procedure call. This is useful when you want to debug a body of code which contains a call to a complex or lengthy procedure, which you do not want to debug right now. |
|
Step Out: This is for when you are currently stepping through a procedure and wish to exit it while you're still in it. This would bring you to the line immediately following the line which called the procedure you were in. This option is disabled when you cannot step out of the current procedure (as will be with an event handler). |
|
Run to Cursor: The cursor, in this case, is the text insertion point. The little blinking black line. You can place the cursor anywhere within the body of your program and have the program execute until it reaches that point. When, and if, that point is reached, the program pointer will be shown. |
|
Jump to Cursor: This command makes the program pointer unconditionally skip to the point where the cursor is. It will just jump there and skip the execution of some code. |