Answers.Body: <p>Twig's <code>dump</code> tag is only available when Craft's <a href="https://craftcms.com/docs/config-settings#devMode" rel="noreferrer">devMode</a> is enabled.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:41:22.120Z
Answers.Text: `devMode` needs to be in the `'.dev'` array block. Or if you want it globally, it needs to be in the `'*'` key. See https://craftcms.com/docs/multi-environment-configs for more info.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:42:14.217Z
Answers.Text: It seems to be in the `.dev` array block; see above.
Answers.UserDisplayName: nickcoxdotme
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:43:02.920Z
Answers.Text: Do you have a `'*'` block? Required for multi-environment configs.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:58:17.063Z
Answers.Text: Yes, there's a `'*'` block. `devMode` isn't in there because I don't want it globally.
Answers.UserDisplayName: nickcoxdotme
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:59:04.160Z
Answers.Text: Just ignore me... Patrick's answer is correct.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:36:13.683Z
Answers.LastActivityDate: 2016-04-04T17:36:13.683Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>The dump tag is not a logic operator (e.g., no percent sign) — it should use the simple field brackets. As well, the proper format is either .url or .getUrl()</p>
  
  <pre><code>{{ dump(craft.request.url) }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:44:54.920Z
Answers.Text: Of course I overlook the obvious.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:45:31.720Z
Answers.Text: ;) I've done the same way too many times.
Answers.UserDisplayName: Patrick Harrington
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T17:44:15.710Z
Answers.LastActivityDate: 2016-04-04T18:14:23.960Z
Answers.LastEditDate: 2016-04-04T18:14:23.960Z
Answers.UserDisplayName: Patrick Harrington
Body: <p>I'm using Craft 2.6.2776. According to the <a href="https://craftcms.com/docs/templating/functions" rel="nofollow">templating docs</a>, Craft extends the built-in <a href="http://twig.sensiolabs.org/doc/functions/index.html" rel="nofollow">Twig templating functions</a>, which it links to. Among those functions is <a href="http://twig.sensiolabs.org/doc/functions/dump.html" rel="nofollow"><code>dump()</code></a>. </p>
  
  <p>Here's the relevant part of my template:</p>
  
  <pre><code>{% dump(craft.request.getURL) %}
  </code></pre>
  
  <p>When I refresh the page, I get the error <code>Unknown "dump" tag.</code>.</p>
  
  <p>It seems like <code>dump</code> should be supported, according to the docs. What's going on?</p>
  
  <h2>Edit</h2>
  
  <p>I'm using VirtualHostX to run my PHP server, and the URL is xxx.dev. According to my <code>general.php</code> file, I am in dev mode:</p>
  
  <pre><code>  '.dev' =&gt; array(
      'enableTemplateCaching' =&gt; false,
      'siteUrl' =&gt; 'http://xxx.dev',
      'environmentVariables' =&gt; array(
        'baseUrl' =&gt; 'http://xxx.dev'
      ),
      'devMode' =&gt; true
    ),
  </code></pre>
  
Tags: <templating><debugging>
Title: "Unknown dump tag"
ThreadText: # "Unknown dump tag"
  
  (Asked by: username_0 on 2016-04-04)
  
  I'm using Craft 2.6.2776. According to the [templating docs](https://craftcms.com/docs/templating/functions), Craft extends the built-in [Twig templating functions](http://twig.sensiolabs.org/doc/functions/index.html), which it links to. Among those functions is [`dump()`](http://twig.sensiolabs.org/doc/functions/dump.html).
  
  Here's the relevant part of my template:
  
  ```
  {% dump(craft.request.getURL) %}
  
  ```
  
  When I refresh the page, I get the error `Unknown "dump" tag.`.
  
  It seems like `dump` should be supported, according to the docs. What's going on?
  
  ## Edit
  
  I'm using VirtualHostX to run my PHP server, and the URL is xxx.dev. According to my `general.php` file, I am in dev mode:
  
  ```
    '.dev' => array(
      'enableTemplateCaching' => false,
      'siteUrl' => 'http://xxx.dev',
      'environmentVariables' => array(
        'baseUrl' => 'http://xxx.dev'
      ),
      'devMode' => true
    ),
  
  ```
  
  **Tags:** templating, debugging
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-04-04. Score: 7 | Accepted answer
  
  The dump tag is not a logic operator (e.g., no percent sign) — it should use the simple field brackets. As well, the proper format is either .url or .getUrl()
  
  ```
  {{ dump(craft.request.url) }}
  
  ```
  
  > **Comments:**
  > **username_1**: Of course I overlook the obvious.  
  > **username_2**: ;) I've done the same way too many times.  
  
  ---
  
  ### Answer by username_1 on 2016-04-04. Score: 5
  
  Twig's `dump` tag is only available when Craft's [devMode](https://craftcms.com/docs/config-settings#devMode) is enabled.
  
  > **Comments:**
  > **username_1**: `devMode` needs to be in the `'.dev'` array block. Or if you want it globally, it needs to be in the `'*'` key. See https://craftcms.com/docs/multi-environment-configs for more info.  
  > **username_0**: It seems to be in the `.dev` array block; see above.  
  > **username_1**: Do you have a `'*'` block? Required for multi-environment configs.  
  > **username_0**: Yes, there's a `'*'` block. `devMode` isn't in there because I don't want it globally.  
  > **username_1**: Just ignore me... username_2's answer is correct.  
  
  ---
  
  