How to use django-debug-toolbar on AJAX calls?

Charles Offenbacher picture Charles Offenbacher · Feb 26, 2011 · Viewed 14.5k times · Source

I'm curious if there's a reasonable way to use the (amazing) django-debug-toolbar with AJAX queries.

For example, I use a jQuery $.get with a bunch of parameters to hit a Django URL and load it inline. If I have an error with that, it isn't registered on the toolbar. I also can't use it by copying the AJAX URL because DDT attaches to the body tag of the response, and it wouldn't make any sense to be including body tags with AJAX responses.

Any direction would be helpful! Thanks!

Answer

recamshak picture recamshak · Oct 17, 2013

I had the same problem before! And as I'm doing more and more AJAX heavy applications, I released a Django Application and a Chrome extension that together solved exactly that problem.

All the information is in the github repository.