Troubleshooting Client Event Scripts

Use loggers liberally at debug level throughout the script.

When first writing a script, I do so for 1 tag, I hard code the tagPath and/or parent paths, and other things and insure that the script works as expected. Then I move on to a list of hardcoded paths if needed, before I ever actually implement it in the gateway. Even then I still insure that I use a logger, sometimes even multiple loggers in the same script, so I can look back and get an idea of what went wrong.

Use multiple except blocks to ensure you catch jython exceptions as well as java exceptions.

2 Likes