Breakpoints

Using breakpoints is the same as Running to the cursor, except that you can have several breakpoints.

So to debug using breakpoints, in the Editor window, click the left margin of the line where you want to insert a breakpoint, then you select Debug/Toggle breakpoint menu option, or you press F9 or you click the Breakpoint icon in the Debug toolbar (select View/Debug toolbar menu option to make the Debug toolbar displayed). You can insert as many breakpoints as you want (remember that the breakpoints are not saved when you close the Editor). A breakpoint cannot be inserted in front of a Until or Wend line.

To start debugging, press F5 or select Debug/Start/Continue Debugging menu option, or click the Start/Continue debugging icon in the Debug toolbar. Script execution stops just before the line where the breakpoint is inserted. Using the Watch Variables window, you can see the values of the variables you have speficied (note that you can add a new variable in the Watch window and see immediately its value at the point where the script has halted). Click the Start debugging icon again to execute till the next breakpoint. If you want to stop Debug mode, press Shift + F5 or select Debug/Stop Debugging menu option, or click the Stop debug icon in the Debug toolbar.

The breakpoint icon is a toggle, so use it too if you want to delete a breakpoint. To delete all the breakpoints, press Shift + F9 or select Debug/Remove all breakpoints menu option, or click the Remove all breakpoints icon in the Debug toolbar.

See also

Run to cursor