Klipfolio. The KPI Dashboard - Evolved
The KPI Dashboard – Evolved
1-877-233-6149
Contact Us

Klip Developer Guide

Table of Contents

Appendix D. A Tour of the Debug Window

D.1. Introduction to the Debug Window

In Klipfolio Dashboard Developer Edition, the Debug Window is available for each Klip through its toolbar's Show debug window button. You can also open it using the keyboard shortcut Ctrl + D or by selecting Show debug window 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.

Figure D.1. Debug Window

Debug Window

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

ButtonDescription
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 KlipThis button will cause the Klip to reload with its stored preferences. This is the same as using the Reload (keep customization).
Clear TraceRemoves all the trace output from the Debug Window.
View SourceOpens the Klip in Notepad or your preferred Klip editing program. Use this to make quick changes to the Klip, then use the Reload Klip button to instantly test your changes.
Empty CacheDeletes 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 Trace 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 Evaluate 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”.