[Fixed]-Cannot get django-debug-toolbar to appear

4πŸ‘

βœ…

All of the divs with display: none; are in fact behaving properly. They won’t change to display: block; until you actually click on them in the toolbar itself.

The button used to toggle the toolbar is the div with an id="djDebugToolbarHandle". As you can see in your console, this button has a top position of 2310px. What this means is that it is rendering, but it is just way down off the page.

Try typing the following in the console to reset its position:

document.getElementById('djDebugToolbarHandle').style.top="30px";
πŸ‘€rnevius

9πŸ‘

I had the same problem but managed to fix it following dvl’s comment on this page. Here is a summary of the fix:

In settings.py

if DEBUG:
    MIDDLEWARE += (
        'debug_toolbar.middleware.DebugToolbarMiddleware',
    )
    INSTALLED_APPS += (
        'debug_toolbar',
    )
    INTERNAL_IPS = ('127.0.0.1', )
    DEBUG_TOOLBAR_CONFIG = {
        'INTERCEPT_REDIRECTS': False,
    }

In the project urls.py, add this url pattern to the end:

from django.conf import settings

if settings.DEBUG:
    import debug_toolbar

    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
πŸ‘€Greg Brown

7πŸ‘

Some information for news users as me, when dev on virtual or remote machine

Add this ligne in a views.py file

print("IP Address for debug-toolbar: " + request.META['REMOTE_ADDR'])

When the views is call, you can see the client IP in the shell

You have to add this IP the settings.py file
INTERNAL_IPS = (β€˜IP’)

πŸ‘€remy_dev

1πŸ‘

I had the same problem. Changing the finder module in my settings.py worked for me:

STATICFILES_FINDERS = (
    #'django.contrib.staticfiles.finders.FileSystemFinder', #THIS BREAKES debug_toolbar
    'django.contrib.staticfiles.finders.AppDirectoriesFinder', #THIS WORKS
)

Make sure to clean the browser cache after this change.

But after this, Django gave me error messages during collectstatic, due to this issue. I solved creating two configurations in my settings.py:

class Production(Base):
   DEBUG = False
   STATICFILES_FINDERS = (
      'django.contrib.staticfiles.finders.FileSystemFinder',
   )

class Develop(Base):
   DEBUG = True
   STATICFILES_FINDERS = (
      'django.contrib.staticfiles.finders.AppDirectoriesFinder',
   )

I hope it helps.

1πŸ‘

One reason why django-debug-toolbar might appear but not appear correctly, (items stuck in β€œLoading”) is if manage.py collectstatic has not been run. Just thought I’d post that here in case it helps someone.

πŸ‘€Loose Cannon

0πŸ‘

i was have same issue with django-toolbar

all tags have class djdt-hidden and hidden

<div id="djDebug" class="djdt-hidden" dir="ltr" data-default-show="true">

i using pycharm and GoogleChrome

just using FireFox and it was fixed

πŸ‘€hn_tired

Leave a comment