My Debug toolbar has suddenly gone missing. There are no javascript errors indicating a problem with the actual toolbar, but all the code loading the plugin also remains in place. Checking and double checking my environment variables, I find DEBUG set to true. I see no error messages in my log files: it’s almost as if I’ve uninstalled the plugin, but I haven’t.
But we’re not supposed to have to put that link directly into our templates, right? That’s why we do this:
<?= $this->fetch('scriptBottom'); ?>
I’ve never manually loaded the DebugKit, so I’m not sure that’s what’s necessary now. Your link doesn’t obviously work because it’s specific to your setup.
No, you don’t need to add that script tag yourself because it gets added via DebugKitMiddleware as you see here:
and
So just make sure your debug mode is on and your TLD is marked as safe as talked above.
With that the DebugKitMiddleware should be loaded and therefore the script tag should be added to your body automatically.
Thanks for that. This is an existing application that’s been working in the past. But of course, I double checked that debug mode is on, which it is:
.env:
export DEBUG=true
The plugin is further being loaded in Application.php:
if (Configure::read('debug')) {
$this->addPlugin('DebugKit');
}
Meanwhile, I’m working on localhost, so there’s no worries about the TLD. So I’m at a loss as to what is preventing it from loading. There are no console errors, nor is the javascript even being included on the page, that I can see.