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

Include django.contrib in the stacktraces

Open apollo13 opened this issue 12 years ago • 3 comments

As a followup to #504 I think it would be a good idea to show traces for django.contrib. list_display is one of the usual offenders which can easily cause quite a few queries which is relatively hard to debug for newcomers -- having a trace would certainly help.

apollo13 avatar Dec 21 '13 23:12 apollo13

This used to be the case before 03fd1cc81c02a5462aeb4dbce0bfe8a2afdef43d.

aaugustin avatar Dec 23 '13 09:12 aaugustin

It looks like there's a comment that still mentions that contrib should show up. The first two options I see are, 1) add some logic to utils.tidy_stacktrace that allows django.contrib to be included, the other would be to change the setting HIDE_IN_STACKTRACE to include all modules of django except for django.contrib.

tim-schilling avatar Jul 01 '14 14:07 tim-schilling

That patch works but it's a bit messy. I would like to look for other ideas before making a decision.

Maybe we need a more thorough refactoring of this feature. By the way, I'm wondering how the current implementation fares with namespace packages, whose bits can live in various directories — probably not well.

aaugustin avatar Jul 26 '14 20:07 aaugustin