# `paste.debug.debugapp` – debug app

Middleware that tests the validity of all generated HTML using the WDG HTML Validator

## Module Contents

class paste.debug.wdg_validate.WDGValidateMiddleware(app, global_conf=None, wdg_path='validate')

  Middleware that checks HTML and appends messages about the validity of the HTML. Uses: http://www.htmlhelp.com/tools/validator/ – interacts with the command line client. Use the configuration `wdg_path` to override the path (default: looks for `validate` in $PATH).

  To install, in your web context’s __init__.py:

      def urlparser_wrap(environ, start_response, app):
          return wdg_validate.WDGValidateMiddleware(app)(
              environ, start_response)

  Or in your configuration:

      middleware.append('paste.wdg_validate.WDGValidateMiddleware')

paste.debug.wdg_validate.make_wdg_validate_middleware(app, global_conf, wdg_path='validate')

  Wraps the application in the WDG validator from http://www.htmlhelp.com/tools/validator/

  Validation errors are appended to the text of each page. You can configure this by giving the path to the validate executable (by default picked up from $PATH)