| Products | Purchase | Support | Download | News | About |
|
|
Support - Script Examples |
||||||||||||||||||||
|
Debugging and Error Trapping
Project: In the course of developing a complex script, the script hangs and doesn’t finish the whole sequence of steps. The Script developer would like to find out if there is an endless loop, or a command that did not execute, or some other problem in the script causing it to work improperly. Algorithm: Since the developer does not know exactly where the problem occurs, the DEBUG command can be used to display the commands executed. That will give a quick indication if it is an endless loop, or if the script is waiting at a particular command. Depending on the size of the project and isolation of the problem, the DEBUG output can be written to a file or displayed in a separate window, and run in step mode or continually. If the Script developer was testing a suspect command which would fail but not hold up the script, then checking the value of the ERROR( ) function and RESULT( ) function would be the best approach. Product used in this example: DynaComm Connectivity Series® 9. (release 9.0.0.0) Relevant Commands and Functions:
DEBUG — Writes script commands to file or display as they are executed A Brief Example:
; Script commands that are suspected to have problems By specifying an output filename of "?", this example uses the Debugger in Step Mode, which means that each command is displayed before it is executed, and the developer chooses Resume to continue. The SHOW command is placed in the script where the Debugging should start, and NOSHOW can be used to turn it back off. In this example, we also make use of a special SYSTEM command that writes a message to the Script Messages section of the debug window to display the value of a variable. Note that this command only works if a Debug window is displayed at the time it is executed. An alternate way to reporting variable values is to use a utility routine like:
*DisplayStrVar($value) which allows you to read a value, click on OK, and continue the script. Further development:
|
||||||||||||||||||||
![]() |
Purchase | Contact | Privacy Policy | Terms of Use | Sitemap | Blog |
© 2010 FutureSoft, Inc. All Rights Reserved
|
||||||
|
DynaComm i:filter |
Internet Filtering |
Employee Internet Monitoring |
Managing Internet Access |
Web Filtering |
Internet Monitoring |
DCS Terminal Emulation | TN 3270 | ProComm Plus Replacement | Windows Terminal Emulation | TN 5250 | DynaComm Connectivity Series | MultiView |
||||||