From 3b44c785ca4e0295ac01b2d886dd377e6360425d Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 29 Jul 2012 01:20:46 -0400 Subject: [PATCH] Update documentation to include mention of DEBUG_ON_EXCEPTION --- apps/common/__init__.py | 2 +- docs/topics/development.rst | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/common/__init__.py b/apps/common/__init__.py index 568776767e..de191880ff 100644 --- a/apps/common/__init__.py +++ b/apps/common/__init__.py @@ -25,7 +25,7 @@ from .models import AutoAdminSingleton from .debug import insert_pdb_exception_hook if getattr(settings, 'DEBUG_ON_EXCEPTION', False): - insert_import_hook() + insert_pdb_exception_hook() bind_links(['about_view', 'license_view'], [about_view, license_view], menu_name='secondary_menu') bind_links(['current_user_details', 'current_user_edit', 'password_change_view'], [current_user_details, current_user_edit, password_change_view], menu_name='secondary_menu') diff --git a/docs/topics/development.rst b/docs/topics/development.rst index 5ef1e680d6..3bbc8dc59b 100644 --- a/docs/topics/development.rst +++ b/docs/topics/development.rst @@ -101,4 +101,14 @@ Likewise, to see the debug output of the ``tags`` app, just add the following in }, +-------------------------- +Automatic PDB on exception +-------------------------- +For an additional tool for debugging problems in **Mayan EDMS**, set the +configuration option ``DEBUG_ON_EXCEPTION`` to True and whenever an +exception occurs, the `Python Debugger`_ will launch automatically at +the exception point. + + .. _`logging capabilities`: https://docs.djangoproject.com/en/dev/topics/logging +.. _`Python Debugger`: http://docs.python.org/library/pdb.html