Skip to content

Commit

Permalink
Added GAE debugging snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Sep 25, 2011
1 parent ec9e8eb commit c1bc164
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/faq.rst
Expand Up @@ -153,6 +153,18 @@ the traceback may be incomplete. There is currently no good workaround
for Jython or the AppEngine as ctypes is unavailable there and it's not
possible to use the debugsupport extension.

If you are working in the Google Appengine development server you can
whitelist the ctypes module to restore the tracebacks. This however won't
work in production environments::

import os
if os.environ.get('SERVER_SOFTWARE', '').startswith('Dev'):
from google.appengine.tools.dev_appserver import HardenedModulesHook
HardenedModulesHook._WHITE_LIST_C_MODULES += ['_ctypes', 'gestalt']

Credit for this snippet goes to `Thomas Johansson
<http://stackoverflow.com/questions/3086091/debug-jinja2-in-google-app-engine/3694434#3694434>`_

Why is there no Python 2.3 support?
-----------------------------------

Expand Down

0 comments on commit c1bc164

Please sign in to comment.