<p>If you have devMode set to "true" in your config files, you can use "dump" in a twig template like this without any plug in needed:</p>

<pre><code>{{ dump(myArray) }}
</code></pre>

CC BY-SA 3.0
2016-07-30T10:56:23.130Z
Tip: `devMode` is enabled by adding `'devMode' => true` to `craft/config/general.php`.
Simon East
CC BY-SA 3.0
2014-08-17T20:21:58.907Z
2014-08-17T20:21:58.907Z
John Morton
<p>There's a plugin called "craft inspector" <a href="https://github.com/adrianmacneil/craft-inspector">https://github.com/adrianmacneil/craft-inspector</a> that has come in handy.</p>

<pre><code>{{ craft.request | inspect }}
{{ inspect(craft.request) }}
</code></pre>

CC BY-SA 3.0
2014-06-12T04:58:52.663Z
2014-06-12T04:58:52.663Z
jnowland
<p>There's <a href="https://github.com/lukeholder/craft-dbug">the dbug plugin</a> which should give you what you are after, template side.</p>

<blockquote>
  <p>This plugin adds a helpful dbug method to your Craft templates. This
  will help you see in the dark - figure out what kind of variables you
  are dealing with, and what methods they implement.</p>
</blockquote>

CC BY-SA 3.0
2016-08-31T17:50:29.823Z
The dbug plugin isn't supported anymore, and Luke (the author) recommended [craft_kint](https://github.com/mildlygeeky/craft_kint) instead.
Matt Stein
CC BY-SA 3.0
2014-06-12T01:28:45.073Z
2014-06-12T01:28:45.073Z
Iain Urquhart
<p>If I'm used to PHP's <code>var_dump()</code> and <code>print_r()</code> to check the value of a variable, how can I evolve to inspect things in Craft where Twig's <code>dump</code> isn't available?</p>

CC BY-SA 3.0
2014-06-12T01:33:04.290Z
In what cases would Twig's dump() function not be available? You mean just when Dev Mode isn't enabled?
Brandon Kelly
CC BY-SA 3.0
2014-06-12T01:37:31.167Z
Yes, that is apparently what I mean. I've learned something, but now I feel a bit daft.
Matt Stein
<templating><debugging>
How can I check on the value of a template variable?
# How can I check on the value of a template variable?

(Asked by: username_0 on 2014-06-12)

If I'm used to PHP's `var_dump()` and `print_r()` to check the value of a variable, how can I evolve to inspect things in Craft where Twig's `dump` isn't available?

**Tags:** templating, debugging

> **Comments:**
> **username_1**: In what cases would Twig's dump() function not be available? You mean just when Dev Mode isn't enabled?  
> **username_0**: Yes, that is apparently what I mean. I've learned something, but now I feel a bit daft.  

---

## 3 answers

### Answer by username_5 on 2014-06-12. Score: 13 | Accepted answer

There's [the dbug plugin](https://github.com/lukeholder/craft-dbug) which should give you what you are after, template side.

> This plugin adds a helpful dbug method to your Craft templates. This
> will help you see in the dark - figure out what kind of variables you
> are dealing with, and what methods they implement.

> **Comments:**
> **username_0**: The dbug plugin isn't supported anymore, and Luke (the author) recommended [craft_kint](https://github.com/mildlygeeky/craft_kint) instead.  

---

### Answer by username_2 on 2014-08-17. Score: 22

If you have devMode set to "true" in your config files, you can use "dump" in a twig template like this without any plug in needed:
{{ dump(myArray) }}

> **Comments:**
> **username_3**: Tip: `devMode` is enabled by adding `'devMode' => true` to `craft/config/general.php`.  

---

### Answer by username_4 on 2014-06-12. Score: 7

There's a plugin called "craft inspector" https://github.com/adrianmacneil/craft-inspector that has come in handy.
{{ craft.request | inspect }}
{{ inspect(craft.request) }}


---

