# debug

Source: https://zotonic.com/docs/1388/debug

URI: https://zotonic.com/id/1388

Language: en



Shows which variables are assigned for use in the current template’s scope:

```erlang
{% debug %}
```

Optionally, variable names can be provided to be debugged:

```erlang
{% debug session_id q template zotonic_dispatch %}
```

By default, all key nodes are collapsed. Expanded, each node contains the value associated and highlighted as Erlang code:
<!-- z-media 3092 {"alt":"Debug output with expanded variable nodes","caption":"-","size":"large"} -->
The debug scomp contains three buttons at the top right:

- `_`: Collapse all key nodes;
- `□`: Expand all key nodes;
- `×`: Removes the debug element from the HTML document.

There is also a resizer at the bottom right corner to resize the `debug` element horizontally.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1388?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1388?language=en>)
