class documentation

class DebuggedApplication:

View In Hierarchy

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.

Parameters
appthe WSGI application to run debugged.
evalexenable exception evaluation feature (interactive debugging). This requires a non-forking server.
request​_keyThe key that points to the request object in ths environment. This parameter is ignored in current versions.
console​_paththe URL for a general purpose console.
console​_init​_functhe function that is executed before starting the general purpose console. The return value is used as initial namespace.
show​_hidden​_framesby default hidden traceback frames are skipped. You can show them by setting this parameter to True.
pin​_securitycan be used to disable the pin based security system.
pin​_loggingenables the logging of the pin system.
Method __call__ Dispatch the requests.
Method __init__ Undocumented
Method check​_pin​_trust No summary
Method debug​_application Run the application and conserve the traceback frames.
Method display​_console Display a standalone shell.
Method execute​_command Execute a command in a console.
Method get​_resource Return a static resource from the shared folder.
Method log​_pin​_request Log the pin if needed.
Method pin.setter Undocumented
Method pin​_auth Authenticates with the pin.
Instance Variable app Undocumented
Instance Variable console​_init​_func Undocumented
Instance Variable console​_path Undocumented
Instance Variable evalex Undocumented
Instance Variable frames Undocumented
Instance Variable pin​_logging Undocumented
Instance Variable request​_key Undocumented
Instance Variable secret Undocumented
Instance Variable show​_hidden​_frames Undocumented
Instance Variable tracebacks Undocumented
Property pin Undocumented
Property pin​_cookie​_name The name of the pin cookie.
Method ​_fail​_pin​_auth Undocumented
Class Variable ​_pin​_cookie Undocumented
Instance Variable ​_failed​_pin​_auth Undocumented
Instance Variable ​_pin Undocumented
def __call__(self, environ, start_response):
Dispatch the requests.
Parameters
environ:WSGIEnvironmentUndocumented
start​_response:StartResponseUndocumented
Returns
t.Iterable[bytes]Undocumented
def __init__(self, app, evalex=False, request_key='werkzeug.request', console_path='/console', console_init_func=None, show_hidden_frames=False, pin_security=True, pin_logging=True):

Undocumented

Parameters
app:WSGIApplicationUndocumented
evalex:boolUndocumented
request​_key:strUndocumented
console​_path:strUndocumented
console​_init​_func:t.Optional[t.Callable[[], t.Dict[str, t.Any]]]Undocumented
show​_hidden​_frames:boolUndocumented
pin​_security:boolUndocumented
pin​_logging:boolUndocumented
def check_pin_trust(self, environ):
Checks if the request passed the pin test. This returns True if the request is trusted on a pin/cookie basis and returns False if not. Additionally if the cookie's stored pin hash is wrong it will return None so that appropriate action can be taken.
Parameters
environ:WSGIEnvironmentUndocumented
Returns
t.Optional[bool]Undocumented
def debug_application(self, environ, start_response):
Run the application and conserve the traceback frames.
Parameters
environ:WSGIEnvironmentUndocumented
start​_response:StartResponseUndocumented
Returns
t.Iterator[bytes]Undocumented
def display_console(self, request):
Display a standalone shell.
Parameters
request:RequestUndocumented
Returns
ResponseUndocumented
def execute_command(self, request, command, frame):
Execute a command in a console.
Parameters
request:RequestUndocumented
command:strUndocumented
frame:t.Union[Frame, _ConsoleFrame]Undocumented
Returns
ResponseUndocumented
def get_resource(self, request, filename):
Return a static resource from the shared folder.
Parameters
request:RequestUndocumented
filename:strUndocumented
Returns
ResponseUndocumented
def log_pin_request(self):
Log the pin if needed.
Returns
ResponseUndocumented
@pin.setter
def pin(self, value):

Undocumented

Parameters
value:strUndocumented
def pin_auth(self, request):
Authenticates with the pin.
Parameters
request:RequestUndocumented
Returns
ResponseUndocumented
app =

Undocumented

console_init_func =

Undocumented

console_path =

Undocumented

evalex =

Undocumented

frames: t.Dict[int, t.Union[Frame, _ConsoleFrame]] =

Undocumented

pin_logging =

Undocumented

request_key =

Undocumented

secret =

Undocumented

show_hidden_frames =

Undocumented

tracebacks: t.Dict[int, Traceback] =

Undocumented

@property
pin: t.Optional[str] =

Undocumented

@property
pin_cookie_name: str =
The name of the pin cookie.
def _fail_pin_auth(self):

Undocumented

_pin_cookie: str =

Undocumented

_failed_pin_auth: int =

Undocumented

_pin =

Undocumented