Practice Using the Script Debugger - Breakpoints and Variables

  1. In the Script, set breakpoints by clicking the gutter to the left of the lines beginning with: var myNum, var priorityValue, var createdValue
  2. Select Open Script Debugger icon on the Syntax Editor toolbar or the System Diagnostics > Script Debugger module on the Application Navigator. The Script Debugger opens in another browser window
  3. Notice the list of all breakpoints set in the platform by you appears on the left-side of the code pane
  4. Set another breakpoint by clicking the gutter to the left of the line beginning with SlaTargetNotification
  5. What can you conclude about where breakpoints can be set? Record your answer
  6. Keep the Script Debugger window open. Force the Lab 5.1 Business Rule Debugging Business Rule to execute ->
  7. Open any active Incident, change the value of State to anything except Closed
  8. Save the record remain on the form
  9. Select Start Debugging
  10. Script execution is paused at the first breakpoint. How can you tell?
  11. Examine the value of the myNum variable in the Local variables section on the right-side of the window. Does it contain the value you expected?
  12. Select the Next Breakpoint button to resume script execution and pause at the next breakpoint
  13. Re-examine the value of the myNum variable in the Local variables section. What value does it contain now?
  14. Explain why the myNum variable value is sometimes undefined and sometimes has a value
  15. Repeat steps 11-13 to watch values of the priorityValue and createdValue variables update as you step through the code
  16. When you reach the breakpoint on the line beginning with SlaTargetNotification, select the Next Breakpoint button one last time to complete the execution of the script
  17. Think of an example in the past where you declared variables in a script and they did not return the values you were expecting. Would it have been helpful to have variable value output available like this?

results matching ""

    No results matching ""