Watch window

BASin

Watch List window

The Watch List window is available from the View menu.

Watch list window

Watches are another tool which, like breakpoints, are evaluated at runtime. Unlike breakpoints, they are evaluated after every line and statement of your program, so they can take up quite a lot of CPU time if you have many of them present in the Watch list. Watches consist of different types - the most basic being an expression which the user enters, and is evaluated as the program runs. Other watch types include variable watches, system variable watches, and watches that monitor memory addresses. This can be very handy for keeping an eye on how your program affects the environment it runs in.

The main area of the window is the Watch List. This lists, like the Breakpoints Window, every watch declared by you. To the left of each entry is the "Enabled" checkbox - you can disable watches temporarily with this. The "Result" field to the right will inform you that the Watch is disabled if you choose to do this.

After the Enabled box, the expression or type of watch is listed. Variables are listed with a prefix "Var:", System variables are given a "SysVar:" prefix, and memory watches are listed with a "Mem" prefix followed by the data size that they are watching (Byte, Word or DWord). Finally the result of the watch, if it is enabled, is shown. In the case of an expression, the result of the evaluation (or any syntax errors in the expression) is shown. Variables will display their contents, unless they become undefined due to a CLEAR statement for example, where they will show the "Variable not found" error.

Managing watches

You can use the "Add New…" button to add a new watch (the Watch Properties Window will pop up to allow you to customise the new Watch), or right-click in an empty part of the watch list and choose the corresponding menu item. Delete watches using the "Delete" button after highlighting a watch in the list, or again use the context menu on your right mouse button. You can alter any watch by selecting it and using the "Properties" button, which will bring up the Watch Properties Window.

If you find that your watches are at odds to your program state (after you maybe POKE'd one of your variables programmatically for example), you can force a manual update of all watches by clicking the "Refresh" button, which again is available on the context menu.