Debugging Script Files |
Top Previous Next |
Robo-FTP provides several commands to specifically facilitate the debugging of script files. These commands are:
There is also a control named Enable Breakpoints under the Scripts menu which controls whether or not BREAK command(s) are recognized when a script is running.
When debugging, place the BREAK command at strategic places in the flow of execution of a script file to be debugged. When the Robo-FTP script processor encounters a BREAK, script execution will be suspended.
Robo-FTP is now in the break state and control is returned to the console window. Here you can view variable values, for example, by typing DISPLAY commands into the console command line, activate the FTP client applet to view the current state of the FTP site, reassign variable values by typing SET or SETNUM, or perform other tasks that may assist you in finding problems in your script logic.
Script execution may be resumed by typing the RESUME command into the console command line or by clicking the Skip To Next Command (Ctrl + N) toolbar button. The script may be stopped by typing the STOP command or by clicking the Stop toolbar button. To restart the script (perhaps after editing it to make corrections), type the GO command or click the Rerun Script File (Ctrl + R) toolbar button.
When your script has been thoroughly debugged, either edit your script and remove all the BREAK commands or clear the Enable Breakpoints control in the Scripts menu and BREAK commands will be ignored on subsequent runs of the script.
|