#4: Use the debug functionality.
When making changes to a script, you could test it’s functionality on existing records but this can become tedious and generate a lot of extra work and records that you’ll need to delete later if you’re not using a sandbox tenant.
Fusion Lifecyle has a great debug tool that you can run from the script editor. You can also pass existing record numbers and specific workflow transition states to in order to test specific functionality against real records.
You can simply use the test button to see if the script causes an errors or if it completes successfully. You can also use the debug button to step through each line of code to follow the exact actions and see what values are being created in the code. You’ll need to be using Chrome to use this capability.
The debug tool provides a method to monitor specific expression values as your script runs. Just click the + button and add the name of the variable to see when the script populates it and what the value is.