MCPcopy
hub / github.com/pallets/werkzeug / render_debugger_html

Method render_debugger_html

src/werkzeug/debug/tbtools.py:327–349  ·  view source on GitHub ↗
(
        self, evalex: bool, secret: str, evalex_trusted: bool
    )

Source from the content-addressed store, hash-verified

325 }
326
327 def render_debugger_html(
328 self, evalex: bool, secret: str, evalex_trusted: bool
329 ) -> str:
330 exc_lines = list(self._te.format_exception_only())
331 plaintext = "".join(self._te.format())
332
333 if sys.version_info < (3, 13):
334 exc_type_str = self._te.exc_type.__name__
335 else:
336 exc_type_str = self._te.exc_type_str
337
338 return PAGE_HTML % {
339 "evalex": "true" if evalex else "false",
340 "evalex_trusted": "true" if evalex_trusted else "false",
341 "console": "false",
342 "title": escape(exc_lines[0]),
343 "exception": escape("".join(exc_lines)),
344 "exception_type": escape(exc_type_str),
345 "summary": self.render_traceback_html(include_title=False),
346 "plaintext": escape(plaintext),
347 "plaintext_cs": re.sub("-{2,}", "-", plaintext),
348 "secret": secret,
349 }
350
351
352class DebugFrameSummary(traceback.FrameSummary):

Callers 1

debug_applicationMethod · 0.95

Calls 2

render_traceback_htmlMethod · 0.95
listFunction · 0.50

Tested by

no test coverage detected