0

I'm debugging a python project (pyproject) in Qt Creator using built-in debugger.

Python print() outputs only to Debugger Log window, where it's mixed with a lot of actual debugger output making it very hard to find the output.

Is that behavior expected or there's an issue with my environment?

Is it possible to somehow output text to Application Output or at least a terminal window?

Additional details

  • I've tried running QtCreator 4.11.0(apt) and 13.0.2(snap) on Ubuntu 20.04.6, problem exists on both
  • If I run the project without debugging, python print() outputs to Application Output window correctly
  • The built-in python debugger runs pdb via Qt's pdbbridge.py and otherwise works ok: breaks on breakpoints, shows variables
  • sys.stderr.write("test123") also outputs only to Debugger log complaining Unexpected pdb stderr: test123
  • Application Output window only shows Debugging starts and Debugging has finished
  • If Run in terminal is enabled - the terminal window is blank
  • C++ and QML debuggers do output to Application Output without issues
  • Redirecting print output to a file breaks debugger until STDOUT redirection is disabled, file is also written only upon close() despite PYTHONUNBUFFERED=1

Thanks in advance, any suggestions or workarounds are welcome.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.