pallets-eco / flask-debugtoolbar

A toolbar overlay for debugging Flask applications
https://flask-debugtoolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
952 stars 146 forks source link

None of the panels show on click or hover. #135

Open jclarksnps opened 5 years ago

jclarksnps commented 5 years ago

I'm using flask 1.0.2, and have the debug toolbar installed but on hover or click of any of the items in the bar i.e templates, sqlalchemy, nothing happens? Note that the menu is showing that there are 3 queries in the sqlalchemy section, but nothing expands.

jeffwidman commented 4 years ago

Is this true with the latest release?

I suspect this is actually a javascript conflict issue, are there any errors listed in the browser console?

ianlintner-wf commented 4 years ago

I had a similar issue but yours could very well be different YMMV. I didn't realize you don't have to call init in your app function. -- I am not using vanilla flask I am using flask-lambda. This only may matter due to the factory app creation.

Javascript is initialized twice causing the click handler in JS to be called 2x which opened and closed the panels immediately after.

I saw the behavior when I had the init call (doh!):

toolbar: DebugToolbarExtension = DebugToolbarExtension(app)
toolbar.init_app(app)

Fixed when I commented it out

toolbar: DebugToolbarExtension = DebugToolbarExtension(app)
'''toolbar.init_app(app)'''

I hope this can help someone else.

Also this project is awesome. Just what I needed. I wanted to developer console for debugging SAML responses when testing endpoints. Very cool❗