Debug

<script type="edgeside/debug" ...>

The debug element is a convenience for developers. It takes any data it finds under a given key, applies JSON.stringify() to it, and renders the results in a 'div' element on the page.

Attributes

Name Description Required?
data-edgeside-input specifies a key under which it should expect to find data yes

Element content

Empty.


Examples

example1 - Dumping Data onto the Page

Perhaps we have an issue with a particular service query. We use the debug element during development to see exactly the data that is returned from the service.

<script type="edgeside/rest"
data-edgeside-output="time"
data-edgeside-endpoint="http://worldtimeapi.org/api/timezone/Europe/London">

</script>
<script type="edgeside/debug"
data-edgeside-input="time">

</script>

Live Results:

{"utc_offset":"+00:00","timezone":"Europe/London","day_of_week":3,"day_of_year":344,"datetime":"2025-12-10T14:47:02.897419+00:00","utc_datetime":"2025-12-10T14:47:02.897419+00:00","unixtime":1765378022,"raw_offset":0,"week_number":50,"dst":false,"abbreviation":"GMT","dst_offset":0,"dst_from":null,"dst_until":null,"client_ip":"108.162.216.120"}

Live Results (Source):