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:

Live Results (Source):