Environment
Situation
Question
Are there any debugging options for troubleshooting application definitions? How can I determine if the application definition is running or where it is failing?
Resolution
Answer
There are a number of options to assist with debugging. The first option is using the MessageBox and Delay commands to check which sections of the application definition are being executed.
The following lines would execute if the logon box was detected. Message boxes would display and 1 second (1000 milliseconds) delays would appear to show clearly which actions the script is performing. Note the delay when tabbing so support staff can clearly view the tab key being pressed 6 times.
#================#
# Logon Prompt #
#================#
Dialog
Title ""Finance System Password""
Class #32770
EndDialog
MessageBox ""If this box appears SecureLogin can see the Logon prompt""
MessageBox ""Typing Username into field""
Type ""$Username""#1200
Delay 1000
MessageBox ""Typing Password into field""
Type ""$Password""#1201
Delay 1000 MessageBox ""Pressing Tab key 6 times""
Repeat 6
Delay 1000
Type ""\T""
EndRepeat
MessageBox ""Pressing the Enter Key""
Type ""\N
To determine whether an application is being run at all, you could place a MessageBox command at the very top line of the definition. If it is running, the MessageBox will appear immediately when you launch the application or access the web site.
To assist with troubleshooting web sites, MessageBox can be used in conjunction with the GetURL, GetText and DumpPage commands. For example, if the following lines were placed up the top of a web site, support staff would be able to establish what text and which URL’s SecureLogin can ""see"", as well as properties of fields on the page.
GetURL ?URL
MessageBox ?URL
GetText ?Text
MessageBox ?Text
DumpPage ?Dump
MessageBox ?Dump