One of the new features introduced in Klipfolio Dashboard 5 is a new and much-improved Debug Window. Instead of one Debug tab in the Klipfolio Dashboard Options window, each Klip now has its own dedicated Debug Window that is accessed through the Klip's Developer Tools menu.
To access a Klip's Debug Window, first make sure Developer mode is turned on by going to Klipfolio Dashboard's Options window and checking Enable built-in Klip development tools on the General tab.
Once Developer mode is activated, right-click on a Klip's title bar and select -> on the menu that appears.
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 A.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 going to the Developer Tools menu and clicking . |
| Clear Trace | Removes all the trace output from the Debug Window. |
| View Source | Opens the Klip in Notepad or your prefered 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 A.2, “Debug Window Tips & Tricks”.