Troubleshooting Debugbar Module

SilverStripe Version 4.2.1

I’ve installed lekoala/silverstripe-debugbar using composer, but the widget isn’t being rendered on the front or back end.

I added this on the PageController class, which I saw in a forum post for a similar problem with this module:

use LeKoala\DebugBar\DebugBar;
public function RenderDebugBar() {
  if (DebugBar::renderDebugBar()) {
    return DebugBar::renderDebugBar();
  } else {

and then call it in the template like this:


But it returns null.

I can confirm that I have no inline scripts, which is mentioned as a possible problem. and ?showqueries returns some info.

  • LeKoala\DebugBar\Proxy\SSViewerProxy->process(HomePageController, Array, SilverStripe\View\SSViewer_DataPresenter)
  • LeKoala\DebugBar\Proxy\SSViewerProxy->process(HomePageController)
  • LeKoala\DebugBar\Middleware\DebugBarMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)

Are there any other tests I can try other than doing a fresh install of SilverStripe and then re-installing the module?

Is your site in dev mode? I haven’t used this module before but I see that’s a requirement for the bar to render.

I have this set in .env:


There’s a method you can use to find out why it’s disabled: silverstripe-debugbar/DebugBar.php at master · lekoala/silverstripe-debugbar · GitHub

1 Like

I added this to the PageController class:

public function whyDisabled() {
  return DebugBar::whyDisabled();

And call it in template, which returns this message: "Not a local IP"

I have a configuration YAML set up with the following:

Name: mysite #This should match the Site Name set in mysite.yml/app.yml
  enabled_in_admin: true
  query_limit: 500

I’ve added this line:

  check_local_ip: false

and did a Dev/Flush and it now seems to be working.