tipfy.ext.debugger ¶
This extension provides a middleware that enables a useful debugger for development. The debugger displays a traceback, highlights the code that caused the exception and provides an interactive console that allows you to examine variables in the request and inside the app.
Note:
Currently there are only Jinja2 templates for the debugger, so tipfy.ext.jinja2 is a dependency. You can use it even if you use a different template engine, though.
Setup¶
To enable the debugger, just add it to the list of middleware classes in config.py:
config.py
config['tipfy'] = {
'middleware': [
# Enable debugger.
'tipfy.ext.debugger.DebuggerMiddleware',
],
}
That's it. Now when an exception occurs, the debugger will display the traceback and allow you to inspect the code. This can be useful in some cases, but the pretty traceback alone makes this extension a must-have!
Note:
The debugger will only be available in development for security reasons.
Extension Reference¶
- Name: tipfy.ext.debugger
- Author: Rodrigo Moraes
- License: BSD
- Tags: debugging, tools
- URL: http://www.tipfy.org/wiki/extensions/debugger/
- PyPi page: http://pypi.python.org/pypi/tipfy.ext.debugger/
- Source code: http://code.google.com/p/tipfy-ext-debugger/
- Issue tracker: http://code.google.com/p/tipfy-ext-debugger/issues/list
- Version: latest
- Edited by moraes on 7/24/10 5:48 AM
- Save on Delicious | Submit to Reddit
- History
- Edit
