Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-30T10:56:23.130Z
Answers.Text: Tip: `devMode` is enabled by adding `'devMode' => true` to `craft/config/general.php`.
Answers.UserDisplayName: Simon East
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-17T20:21:58.907Z
Answers.LastActivityDate: 2014-08-17T20:21:58.907Z
Answers.UserDisplayName: John Morton
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T04:58:52.663Z
Answers.LastActivityDate: 2014-06-12T04:58:52.663Z
Answers.UserDisplayName: jnowland
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-31T17:50:29.823Z
Answers.Text: The dbug plugin isn't supported anymore, and Luke (the author) recommended [craft_kint](https://github.com/mildlygeeky/craft_kint) instead.
Answers.UserDisplayName: Matt Stein
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T01:28:45.073Z
Answers.LastActivityDate: 2014-06-12T01:28:45.073Z
Answers.UserDisplayName: Iain Urquhart
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-12T01:33:04.290Z
Comments.Text: In what cases would Twig's dump() function not be available? You mean just when Dev Mode isn't enabled?
Comments.UserDisplayName: Brandon Kelly
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-12T01:37:31.167Z
Comments.Text: Yes, that is apparently what I mean. I've learned something, but now I feel a bit daft.
Comments.UserDisplayName: Matt Stein
Tags: <templating><debugging>
Title: How can I check on the value of a template variable?
ThreadText: # 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) }}
  
  ```
  
  
  ---
  
  