How to debug scripts in PROMOTIC application
Scripts used in the PROMOTIC application can be debugged (run step-by-step) in any script debugger. But this functionality is disabled by default in the PROMOTIC system by security reasons and it must be enabled before script debugging itself. Script debugging is enabled/disabled in the Script debugging enabled
configurator in the "Options > PROMOTIC settings
" menu of the application editor. If debugging is enabled, then the script debugger is automatically started and the active script and the line is displayed:
- if a script error occurred in the script
- if the special command of the VBScript 'Stop' was encountered while performing scripts
- if a stop entered by the debugger was encountered while performing scripts
During debugging itself the application is stopped and it continues only when the debugged script is run on from the debugger. With the application deployed at the customer with the runtime license it is necessary to keep in mind that this option doesn't remain permanently enabled.
If the option remained enabled by mistake, then the first script error or the command 'Stop
' would stop the application (unwanted). The risk is in that such error can occur after weeks of the operation. If script debugging is disabled (not enabled) in the PROMOTIC system, then the script debugger is called in no case. The VBScript command 'Stop
' is ignored and the script error is shown in the PROMOTIC INFO system
Script debugger isn't a part of the OS Windows. For script debugging the accessory of the MS Office or any newer debugger (Visual Studio development environment or .NET) must be installed.