Stepping

Top  Previous  Next

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

tide_debug_step

 

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.

tide_button_stepinto

Step Into: Steps through your code line by line. When the program pointer reaches a procedure call, you would 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.

tide_button_stepover

Step Over: Steps through your code line by line. When the program pointer reaches a procedure call, it executes this entire procedure, but just does it all at once, and 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.

tide_button_stepout

Step Out: If you are currently stepping through a function and wish to exit it while you're still in the middle, use Step Out. This would bring you to the line immediately following the line which called the function you were in. This option is disabled when you cannot step out of the current function (i.e, when your other function calls it -- such as in the case of an event handler).

tide_button_runtocursor

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 would display.

tide_button_jumptocursor

Jump to Cursor: This command makes the program pointer unconditionally move to the point where the cursor is. It will just jump there, possibly skipping the execution of some code. This is explicit control of program flow.