In Klipfolio Dashboard Developer Edition, the Debug Window is available for each Klip through its toolbar's button. You can also open it using the keyboard shortcut or by selecting from its menu.
A Klip's Debug Window has three main sections: the toolbar at the top, the trace output in the middle, and the instruction area at the bottom.
The trace output section shows any trace output or script errors that the Klip generates, exactly the same way the Debug tab worked in previous versions of Klipfolio Dashboard.
The toolbar provides functionality that is very useful while debugging a Klip. Here are what the buttons do:
Table D.1. Debug Window Options
| Button | Description |
|---|---|
| Refresh Klip | Click this button to refresh the Klip. If the Klip is in the process of refreshing, click this button to stop the refresh. |
| Reload Klip | This button will cause the Klip to reload with its stored preferences. This is the same as using the . |
| Clear Trace | Removes all the trace output from the Debug Window. |
| View Source | Opens the Klip in Notepad or your preferred Klip editing program. Use this to make quick changes to the Klip, then use the button to instantly test your changes. |
| Empty Cache | Deletes all cached content associated with the Klip. |
The instruction area can be used to interact with the Klip directly. Klip code can be entered into the text field and either evaluated or output via trace. For instance, to see the value of the title element of an item, enter the following and click the button:
Items[0].getData("title")Any code that is valid in a Klip's <klipscript> section is also valid in the Debug Window. More complex instructions, such as a for loop, can be entered into the instruction area and then executed using the button. The ability to interact with the Klip directly via JavaScript is a powerful debugging tool which we'll explore in the second part of this appendix, Section D.2, “Debug Window Tips & Tricks”.