So the various commands do this:
F6 - execute the rest of this routine or called external until you return from it, then pause there
F7 - execute 1 line at a time and pause before executing the next line
F8 - (step over) can be used to execute a whole subroutine or called external (you can't actually pause and step through a called external script)
F9 - run (no automatic pause control exists with this command)
When I want to stop at a known spot in the script, I will add a pause statement. A more flexible method is to set a value and pause if that value is set.
set %debug _ , MYVALUE , _
for %i 1 100
{
wait 10
}
; now in this loop, I want to set the pause, but only when %debug has the value _MYVALUE_ in it
if _ , MYVALUE , _ in %debug
{
pause
; so it will stop at this line and you can use the F6 - F9 keys to control program flow from this point
; you can also check and set the values of variables using the right side of the easyuo program
}
for %i 1 10
{
wait 10
}
halt
The benefit of doing it this way is you can control the pause statements by changing the %debug variable to have a variety of values and you can have multiple control points in the script. This will allow you to test a script at full speed without stopping on each line. The script can also keep the debug code in place and by just changing the %debug variable you can allow the whole script to run.
I used the underscores around the value because it forces the phrase to be whole and a partial match won't work - which is safer.
Gaderian