Run menu

BASin

Run menu

This menu is the main control for running your program, and most of the debugging options are in here. Most have keyboard shortcuts. More information on debugging can be found in the chapter headed Debugging your programs.

Run / Pause / Resume

This item will start your program if it is not already running, and has not been paused. Selecting this option again will put your program into pause, or debug mode. A further click on this item will start your program again. Stopping your program this way is not the same as using the BREAK key (the Escape key on your keyboard). Whilst the program is stopped, it cannot be edited but various debugging methods can be carried out.

Note: When using this item whilst the program is neither running nor paused, you should be aware that the program will be started using a RUN direct command, which will perform a CLEAR codeword as part of the startup. This will remove any previously declared variables from memory.

System BREAK / Continue

Sends a BREAK keypress to the running program, or continues running with a CONTINUE statement.

Note: You can only break into a program between statements. This command has no effect until the current statement finishes, even if it is a statement which might not end soon (such as INPUT or PAUSE).

Go to cursor

Continues the program from the location of the edit cursor. This has the same effect as typing

GO TO [line number]

and will not clear your currently declared variables.

Force BREAK

Aborts the running program and returns to the editor as it was before the last direct command was started. Unlike System BREAK, this command has immediate effect and works even when the running program cannot see the Escape key. This is because BASin stores the state of your program just before any direct command is executed, and this menu item will restore that state when clicked.

Trace Execution

Enables or disables tracing, which illustrates program flow by highlighting each statement in your program as it is executed. This can take a considerable amount of CPU time away from your program, which may run significantly slower as a result.

Single Step Statement

When the program is paused, or has triggered a Breakpoint, this item can be used to move through the program one statement at a time - the program will resume execution, and when the next statement has been executed, will pause again. Single-stepping is one of the most powerful debugging tools.

Step Over Statement

Executes the next statement in the program, waits for the program to reach the statement after that, and then pauses. In the case of a GO SUB statement, for example, whereas Single Step Statement would jump to the first line of the subroutine, this command will execute the entire subroutine and move to the next statement on the calling line.

Run to Cursor

Runs the program up to the location of the edit cursor, and then pauses.

Toggle breakpoint

Toggles a breakpoint on the line that the cursor is currently resting upon. This will be a simple breakpoint which will only trigger when program execution reaches that line.

Add Breakpoint

Opens the Add Breakpoint window, where you can specify confitions and other properties for a custom breakpoint.

Add Watch

Opens the Add Watch window.