6

I'm debugging a python script that includes a Print statement. I'm running the script from the QGIS python editor and expecting to see output in the QGIS python console, however once the script has filled the console window rather than scrolling up with each print statement the console window no longer updates and I have to wait until the script has finished before I can see the output of my Print statements. Is there a way I can make the console scroll with each Print statement so I can see the output of the statements as they are processed rather than having to wait until the end.

I'm using QGIS 3.4.12 on Windows 10.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Dec 1, 2019 at 9:28

1 Answer 1

7

You generally shouldn't use print() for debugging this as the Python Console is not built to really help you here.

The best advice is to use QgsMessageLog.logMessage as that will scroll with the output and log out into the log window (bottom right button in the status bar)

answered Dec 1, 2019 at 10:19
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.