class werkzeug.DebuggedApplication(app, evalex=False, request_key='werkzeug.request', console_path='/console', console_init_func=None, show_hidden_frames=False, lodgeit_url=None, pin_security=True, pin_logging=True)[source]

Enables debugging support for a given application:

from werkzeug.debug import DebuggedApplication
from myapp import app
app = DebuggedApplication(app, evalex=True)

The evalex keyword argument allows evaluating expressions in a traceback’s frame context.

New in version 0.9: The lodgeit_url parameter was deprecated.

  • app – the WSGI application to run debugged.
  • evalex – enable exception evaluation feature (interactive debugging). This requires a non-forking server.
  • request_key – The key that points to the request object in ths environment. This parameter is ignored in current versions.
  • console_path – the URL for a general purpose console.
  • console_init_func – the function that is executed before starting the general purpose console. The return value is used as initial namespace.
  • show_hidden_frames – by default hidden traceback frames are skipped. You can show them by setting this parameter to True.
  • pin_security – can be used to disable the pin based security system.
  • pin_logging – enables the logging of the pin system.


__init__(app[, evalex, request_key, ...])
check_pin_trust(environ) Checks if the request passed the pin test.
debug_application(environ, start_response) Run the application and conserve the traceback frames.
display_console(request) Display a standalone shell.
execute_command(request, command, frame) Execute a command in a console.
get_resource(request, filename) Return a static resource from the shared folder.
log_pin_request() Log the pin if needed.
paste_traceback(request, traceback) Paste the traceback and return a JSON response.
pin_auth(request) Authenticates with the pin.


pin_cookie_name The name of the pin cookie.