code: def view(self, request):
          
          auth = yield from self.authorize(request)
          if not auth:
              raise HTTPForbidden()
  
          request_id = request.match_info.get('request_id')
          state = self.history.get(request_id, None)
  
          response = yield from self.app.ps.jinja2.render(
              'debugtoolbar/toolbar.html',
              debugtoolbar=self,
              state=state,
              static_path=self.cfg.prefix + 'static',
              panels=state and state.panels or [],
              global_panels=self.global_panels,
              request=state and state.request or None,
          )
          return Response(text=response, content_type='text/html')
docs: Debug Toolbar.