Where Did My QDebug Output Go?

By | January 2, 2021

You start at a new place or on a new Linux distro coding away on your Qt project and suddenly find yourself asking; “Where did my qDebug() output go?” Lots of people are suddenly finding themselves in this boat. I fell into this boat after installing Majaro so I could work on the code for the last post. You will find a metric buttload of bad information.

In QtCreator you need to navigate to “Manage Kits” and scroll down to the Environment part.

Navigate down to Environment under Kits not the menu on right

You then need to click on “change.”

QtCreator kit environment qdebug output image
Add QT_LOGGING_TO_CONSOLE=1

Add QT_LOGGING_TO_CONSOLE=1 (no spaces) and click the OK button. That’s it. Every time you use that kit on a project your qDebug() output will print out like the used to.

There’s a lot of really bad solutions which aren’t contained to QtCreator itself out there. Don’t be duped into trashing your system.

Related posts:

So You Can’t Get Your Models to Work with QML?

MOC Parse Error at “std”

KDE Neon – Distcc and Qt

CopperSpice Experiments

QtCreator – No qmlScene installed

Qt book

Category: Information Technology Tags:

About seasoned_geek

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born. Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.