Home > Running a Script > Running a Script in Debug Mode > Run To Cursor

Run To Cursor

Running to the cursor is easiest way to use Debug mode. Put the cursor at the line that you want to inspect, select Run to cursor, the script runs at normal speed and stops just before executing the pointed line. You can check some variables using the Watch variables window (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). Then you can put the cursor at another line to go on debugging the script.

To start the Run to cursor execution, select Debug/Run to cursor menu, or click the Run to cursor  icon on the Debug toolbar (select View/Debug toolbar menu to show the Debug toolbar) or press F8.

Then check what you want to check, select the new stop line in the Editor and do a Run to cursor again.

See also

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