django-debug-panel icon indicating copy to clipboard operation
django-debug-panel copied to clipboard

Doesn't work with AJAX only refreshing part of the page

Open MattyDub opened this issue 10 years ago • 8 comments

If I have a web app that only refreshes certain parts of the page via AJAX (i.e. and then uses Javascript to update the DOM), those requests don't show up. Is there some way to configure this to enable all requests to be profiled, not just the ones for the "current" URL?

MattyDub avatar Apr 01 '14 22:04 MattyDub

Do they show up inside the Network panel of chrome devkit ? And if so, do they have the 'X-debug-data-url' header set ?

recamshak avatar Apr 03 '14 00:04 recamshak

Yes they do show up in the Chrome developer tools' Network panel. Yes the response headers include X-debug-data-url, e.g.:

X-debug-data-url:http://127.0.0.1:8000/debug/data/1396559117.528137/

MattyDub avatar Apr 03 '14 21:04 MattyDub

I cannot reproduce that on my computer. Is there any message in the Developer tools' console of the Developer tools itself ? To actually see that console, first open the Developer tools, then undock it from the browser. On the undocked window, press Ctrl+i. That should open another Developer tool where you can see the messages from the first developer tools.

recamshak avatar Apr 09 '14 08:04 recamshak

I'm using this with angular and have the same problem. When browsing the x-debug-data-url I do see the toolbar in the browser. Still helpful but would be nice to see it in the console with the plugin.

michi88 avatar Jul 31 '14 13:07 michi88

Btw, I don't see any messages / errors in the Developer tools' console of the Developer tools itself.

michi88 avatar Jul 31 '14 13:07 michi88

I think I found the problem. The header is all lowercase. https://github.com/recamshak/chrome-django-panel/pull/3 It works for me now.

michi88 avatar Jul 31 '14 13:07 michi88

Thanks for making this BTW ;-)

michi88 avatar Jul 31 '14 13:07 michi88

Later versions of the Django Debug Toolbar (not the panel) disable it on AJAX requests.

If you are having issues with it, redefine the toolbar's show_toolbar function and configure it to use yours.

nsheaps avatar Jan 07 '15 21:01 nsheaps