<p><strong>As the debug toolbar is build-in, you do not have to add it with composer.</strong></p>
<p>You can <strong>enable</strong> the <strong>build-in</strong> debug toolbar in the <strong>upper right corner</strong> on your control panel.</p>
<ol>
<li>Click on your user account</li>
<li>Tab: preferences</li>
<li>Scroll down to: Development</li>
<li>Check both items under 'Debug Toolbar'</li>
</ol>

CC BY-SA 4.0
2024-01-02T16:53:31.547Z
2024-01-02T16:53:31.547Z
user3086053
<p>Bug while installing debug toolbar in Craft 4 latest version:</p>
<pre><code>An Error occurred while handling another error:
yii\base\NotSupportedException: evaluateDynamicContent() is disallowed. in /craft/vendor/craftcms/cms/src/web/View.php:1884
</code></pre>
<p>in /craft/vendor/craftcms/cms/src/web/View.php error is thrown due to 'allowEval' is not set to true?</p>
<pre><code>@inheritdoc
@throws NotSupportedException unless [[allowEval]] has been set to `true`.

public function evaluateDynamicContent($statements)
{
    if (!$this-&gt;allowEval) {
        throw new NotSupportedException('evaluateDynamicContent() is disallowed.');
    }

    return parent::evaluateDynamicContent($statements);
}
</code></pre>
<p>Also setting <code>$allowEval = true;</code> is not recommended.</p>
<p>References:
<a href="https://github.com/yiisoft/yii2-debug" rel="nofollow noreferrer">https://github.com/yiisoft/yii2-debug</a></p>
<p>How can I resolve this error to start using the debug toolbar?</p>

CC BY-SA 4.0
2024-01-02T16:35:24.703Z
Yii's debug toolbar is included by default in Craft. You only need to activate it in your user settings. How are you "installing" it?
MoritzLost
CC BY-SA 4.0
2024-01-02T16:42:28.773Z
The craft docs are referencing to the github link. And I have installed it with composer: composer require --prefer-dist yiisoft/yii2-debug
I'm new to craft, where do I have to enable this in the user settings?
user3086053
CC BY-SA 4.0
2024-01-02T16:47:16.750Z
Found it. Thank you.
user3086053
<craft4><yii><debugging>
evaluateDynamicContent() is disallowed
# evaluateDynamicContent() is disallowed

(Asked by: username_0 on 2024-01-02)

Bug while installing debug toolbar in Craft 4 latest version:
An Error occurred while handling another error:
yii\base\NotSupportedException: evaluateDynamicContent() is disallowed. in /craft/vendor/craftcms/cms/src/web/View.php:1884

in /craft/vendor/craftcms/cms/src/web/View.php error is thrown due to 'allowEval' is not set to true?
@inheritdoc
@throws NotSupportedException unless [[allowEval]] has been set to `true`.

public function evaluateDynamicContent($statements)
{
    if (!$this->allowEval) {
        throw new NotSupportedException('evaluateDynamicContent() is disallowed.');
    }

    return parent::evaluateDynamicContent($statements);
}

Also setting $allowEval = true; is not recommended.
References:
https://github.com/yiisoft/yii2-debug
How can I resolve this error to start using the debug toolbar?

**Tags:** craft4, yii, debugging
> **Comments:**
> **username_1**: Yii's debug toolbar is included by default in Craft. You only need to activate it in your user settings. How are you "installing" it?  
> **username_0**: The craft docs are referencing to the github link. And I have installed it with composer: composer require --prefer-dist yiisoft/yii2-debug I'm new to craft, where do I have to enable this in the user settings?  
> **username_0**: Found it. Thank you.  

---

## 1 answers

### Answer by username_0 on 2024-01-02. Score: 2

**As the debug toolbar is build-in, you do not have to add it with composer.**

You can **enable** the **build-in** debug toolbar in the **upper right corner** on your control panel.

1. Click on your user account
2. Tab: preferences
3. Scroll down to: Development
4. Check both items under 'Debug Toolbar'


---

