Script Debugging
  • 05 Apr 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Script Debugging

  • Dark
    Light
  • PDF

Article summary

Script Debugging refers to the process of using the App Simulator to test your app's scripts.


Running the Script Debugger

With your app open in the App Simulator, click on the 'Script Debugger' button on the right-hand-side of the navigation toolbar.

icon_script_debugger

The tool will appear as a flyout on the right side of your screen.

dk_apps_sim_script_debugger


Overview

Play around and get familiar with the features this tool offers.

At the top you can see the version of your app as well as the time it took to run your app's Ux.Test script.

Tip

App scripts should take milliseconds to run. Anything over 350 milliseconds should concern you and prompt you to make your script more efficient.

Use the 'status' at the top of this tool to see if your script ran successfully or encountered an error. If an error occurs, you will see details about the error so you can fix the issue.

The green 'Test' button will run your app's 'Ux.Test' script immediately whenever you click it. Recall, this is a special script used for testing. Once you feel like this script is running as expected, you can copy and paste this script into another production event inside Symmetry Pro.


Output Log

At the bottom of the Script Debugger tool is the Output Log.

Your scripts can output information based on variable conditions within your scripts. This is a very useful tool when developing your scripts.

Learn more about writing to the output log from your scripts


Real time Updates

When you want to make a change to your app scripts in App Builder, you can do so without having to close or re-open the App Simulator.

  1. Make your script changes in App Builder and click 'Save'
  2. Make sure the 'Reload App' option is checked in the Script Debugger
    This forces a reload of your app just before the Ux.Test script runs
  3. Click 'Test' inside the Script Debugger

Your changes are immediately reflected! Do this as much as needed.


Additional Resources

Here are a few related resources that can be found in this documentation.

Learn more about scripting

Learn more about runtime events

Learn more about programming fundamentals

Learn more about what your scripts can do using graph objects