7 Django packages that help hunt down bugs
- Mar 20, 2022
A configurable set of panels that display various debug information about the current request/response.
A drop-in replacement for Django's runserver.
DEVSERVER_MODULES = ( 'devserver.modules.sql.SQLRealTimeModule', 'devserver.modules.sql.SQLSummaryModule', 'devserver.modules.profile.ProfileSummaryModule', # Modules not enabled by default 'devserver.modules.ajax.AjaxDumpModule', 'devserver.modules.profile.MemoryUseModule', 'devserver.modules.cache.CacheSummaryModule', 'devserver.modules.profile.LineProfilerModule', )
Middleware that Prints the number of DB queries to the runserver console.
QUERYCOUNT = { 'THRESHOLDS': { 'MEDIUM': 50, 'HIGH': 200, 'MIN_TIME_TO_LOG':0, 'MIN_QUERY_COUNT_TO_LOG':0 }, 'IGNORE_REQUEST_PATTERNS': [], 'IGNORE_SQL_PATTERNS': [], 'DISPLAY_DUPLICATES': None, 'RESPONSE_HEADER': 'X-DjangoQueryCount-Count' }

database debugging developer-tools django python
Silky smooth profiling for Django
Features
- Middleware for intercepting Requests/Responses
- A wrapper around SQL execution for profiling of database queries
- A context manager/decorator for profiling blocks of code and functions either manually or dynamically.
- A user interface for inspection and visualisation of the above.
In settings.py
add the following:
MIDDLEWARE = [ ... 'silk.middleware.SilkyMiddleware', ... ] INSTALLED_APPS = ( ... 'silk' )

Auto-detecting the n+1 queries problem in Python
LOGGING = { 'version': 1, 'handlers': { 'console': { 'class': 'logging.StreamHandler', }, }, 'loggers': { 'nplusone': { 'handlers': ['console'], 'level': 'WARN', }, }, }
Sentry is cross-platform application monitoring, with a focus on error reporting.
Django package to log request values such as device, IP address, user CPU time, system CPU time, No of queries, SQL time, no of cache calls, missing, setting data cache calls for a particular URL with a basic UI.
pip install django-web-profiler (or) git clone git://github.com/micropyramid/django-web-profiler.git cd django-web-profiler python setup.py installdjango performance-analysis profiler