id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 24118 Add --debug-sql option to tests to print SQL queries on failure Marc Tamlyn Marc Tamlyn "It's a common problem (*especially* when working on ORM code) to want to print the complete sql queries run during a failing test, especially when parts of the run sql are in the traceback... I've created a POC which adds this feature by customising parts of unittest. The `--debug-sql` option is provided to both `./runtests.py` and `./manage.py test`." New feature closed Testing framework dev Release blocker fixed Accepted 0 0 0 0 0 0