Used stdio for showcapture to show both stdout and stderr in debugging

This commit is contained in:
Eichel Choi 2023-12-06 17:57:52 -05:00
parent fdb8bbf154
commit ea5f445d12
1 changed files with 7 additions and 1 deletions

View File

@ -352,7 +352,13 @@ def _enter_pdb(
("stderr", rep.capstderr), ("stderr", rep.capstderr),
("log", rep.caplog), ("log", rep.caplog),
): ):
if showcapture in (sectionname, "all") and content: if (
showcapture in (sectionname, "all")
or (
showcapture == "stdio"
and ("stdout" in sectionname or "stderr" in sectionname)
)
) and content:
tw.sep(">", "captured " + sectionname) tw.sep(">", "captured " + sectionname)
if content[-1:] == "\n": if content[-1:] == "\n":
content = content[:-1] content = content[:-1]