Home > Running a Script > Running a Script in Debug Mode > 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 select Debug/Toggle breakpoint menu, or press F9 or click the Breakpoint  icon  on the Debug toolbar (select View/Debug toolbar menu option to show the Debug toolbar). 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, or click the Start/Continue debugging  icon on 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, or click the Stop debug  icon on 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, or click the Remove all breakpoints  icon on the Debug toolbar.

See also

About Debug Mode
Debug Mode in Action on a Sample Script
Step by Step Execution
Step Over
Step Out
Run To Cursor
Watch Variables
Debug Toolbar