<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[qDebug() not working.]]></title><description><![CDATA[<p dir="auto">If this is in the wrong category, feel free to move it over.</p>
<p dir="auto">I recently installed a new fedora 40 os. I'm running cmake 3.28.2. (the default cmake in dnf.) Qt 6.7.2. On this computer, I can not get qDebug() to print at all. Even just running cmake/make from the terminal doesn't get any reaction. qWarning, and qInfo both work as expected.</p>
<p dir="auto">I move over to my "old" computer, running Qt 6.7.0, (installed through the online installer), and cmake 3.22.1. There, qDebug() works correctly.</p>
<p dir="auto">Did something with cmake change in the last several releases, since 3.22? I've tried setting the configuration to debug, etc, and haven't gotten anywhere. The application compiles and runs correctly, just no qDebug(). Code is here. <a href="https://github.com/Davidwedel/QtAgOpenGPS/tree/agio_dev" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Davidwedel/QtAgOpenGPS/tree/agio_dev</a></p>
<p dir="auto">Any advice will be much appreciated!</p>
]]></description><link>https://forum.qt.io/topic/159213/qdebug-not-working</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 04:22:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/159213.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Oct 2024 20:43:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to qDebug() not working. on Tue, 07 Apr 2026 19:08:35 GMT]]></title><description><![CDATA[<p dir="auto">I've just come across exactly the same thing on Mageia. Has been driving me nuts!</p>
<p dir="auto">My ini file was identical to OP's.</p>
]]></description><link>https://forum.qt.io/post/837566</link><guid isPermaLink="true">https://forum.qt.io/post/837566</guid><dc:creator><![CDATA[DiBosco]]></dc:creator><pubDate>Tue, 07 Apr 2026 19:08:35 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Fri, 18 Oct 2024 08:34:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davidwedel">@<bdi>davidwedel</bdi></a><br />
So it looks like maybe someone was playing with Qt and switched default debugging off and that's how it got released with this file in it, even if no Qt! :)  Naughty Fedora people!</p>
]]></description><link>https://forum.qt.io/post/812409</link><guid isPermaLink="true">https://forum.qt.io/post/812409</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 18 Oct 2024 08:34:46 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Fri, 18 Oct 2024 02:11:32 GMT]]></title><description><![CDATA[<p dir="auto">It had:</p>
<pre><code>[Rules]
*.debug=false
qt.qpa.xcb.xcberror.warning=false
</code></pre>
<p dir="auto">Interestingly enough, this file is present on a completely fresh Fedora 40 computer. I booted up a live usb that hadn't had anything Qt related installed, and there it was.</p>
]]></description><link>https://forum.qt.io/post/812393</link><guid isPermaLink="true">https://forum.qt.io/post/812393</guid><dc:creator><![CDATA[davidwedel]]></dc:creator><pubDate>Fri, 18 Oct 2024 02:11:32 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Thu, 17 Oct 2024 12:57:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davidwedel">@<bdi>davidwedel</bdi></a><br />
So what was inside it when you found it?  My <code>qDebug()</code>s have always worked fine, presumably with that file always empty, maybe somebody put one in for some reason in whichever Mint distribution.</p>
]]></description><link>https://forum.qt.io/post/812352</link><guid isPermaLink="true">https://forum.qt.io/post/812352</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 17 Oct 2024 12:57:29 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Thu, 17 Oct 2024 12:51:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> said in <a href="/post/812246">qDebug() not working.</a>:</p>
<blockquote>
<p dir="auto">In your case, are you saying there was already a qtlogging.ini file with something inside it supplied with your Fedora?</p>
</blockquote>
<p dir="auto">That's correct. I didn't create it. That also explains why I could never find the qtlogging.ini file on  my Mint 21.1 computer</p>
]]></description><link>https://forum.qt.io/post/812351</link><guid isPermaLink="true">https://forum.qt.io/post/812351</guid><dc:creator><![CDATA[davidwedel]]></dc:creator><pubDate>Thu, 17 Oct 2024 12:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Wed, 16 Oct 2024 09:28:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davidwedel">@<bdi>davidwedel</bdi></a> said in <a href="/post/812201">qDebug() not working.</a>:</p>
<blockquote>
<p dir="auto">Then, went to /usr/share/qt6/qtlogging.ini, and set *.debug=true. Then, the qDebug() logging worked correctly</p>
</blockquote>
<p dir="auto">Just out of interest/for anyone else reading this.  I have the default Qt6 (6.4.2) supplied with Ubuntu 24.04.  There is no <code>/usr/share/qt6/qtlogging.ini</code>, nor any <code>qtlogging.ini</code> file anywhere.  It outputs <code>qDebug()</code> messages just fine, as do all previous Ubuntu releases, without my having to create this or change anything.  In your case, are you saying there was already a <code>qtlogging.ini</code> file with something inside it supplied with your Fedora?</p>
]]></description><link>https://forum.qt.io/post/812246</link><guid isPermaLink="true">https://forum.qt.io/post/812246</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 16 Oct 2024 09:28:45 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Tue, 15 Oct 2024 23:43:14 GMT]]></title><description><![CDATA[<p dir="auto">Aha! Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/jeremy_k">@<bdi>jeremy_k</bdi></a><br />
The final answer was <code>qt.*.debug=false</code>. I now see the qDebug() warnings, but not all the annoyinbg QT logs.<br />
So my qtlogging.ini looks like</p>
<pre><code class="language-[Rules]">qt.*=false
*.debug=true
qt.*.debug=false
qt.qpa.xcb.xcberror.warning=false
</code></pre>
<p dir="auto">Thanks again, both of you!</p>
]]></description><link>https://forum.qt.io/post/812221</link><guid isPermaLink="true">https://forum.qt.io/post/812221</guid><dc:creator><![CDATA[davidwedel]]></dc:creator><pubDate>Tue, 15 Oct 2024 23:43:14 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Tue, 15 Oct 2024 19:20:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davidwedel">@<bdi>davidwedel</bdi></a> said in <a href="/post/812201">qDebug() not working.</a>:</p>
<blockquote>
<pre><code class="language-qt.quick.layouts:">qt.quick.layouts: QQuickGridLayoutBase::rearrange 0 QQuickRowLayout(0x2456f2f0, id="sensorsWindow", parent=0x2456ecf0, geometry=0,0 0x80)
qt.quick.layouts: "" QQuickGridLayoutBase::rearrange() QSizeF(0, 80)
qt.quick.layouts: LEAVE QQuickLayout::ensureLayoutItemsUpdated() QQuickRowLayout(0x2456f2f0)
qt.quick.layouts: QQuickGridLayoutBase::rearrange 0 QQuickRowLayout(0x2456f2f0, id="sensorsWindow", parent=0x2456ecf0, geometry=0,0 0x80)
</code></pre>
<p dir="auto">I can disable this by setting <code>*.debug=false</code> but then I don't get any qDebug() logs. But now, the console fills up much too fast to even read the logs I want.</p>
</blockquote>
<p dir="auto">qt.quick.layouts and similar are hierarchical logging categories that can be controlled. Eg <code>*.debug=true; qt.quick.*.debug=false;</code></p>
]]></description><link>https://forum.qt.io/post/812209</link><guid isPermaLink="true">https://forum.qt.io/post/812209</guid><dc:creator><![CDATA[jeremy_k]]></dc:creator><pubDate>Tue, 15 Oct 2024 19:20:23 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Tue, 15 Oct 2024 18:00:28 GMT]]></title><description><![CDATA[<p dir="auto">OK so I got a few things figured out! I did indeed have QT_NO_DEBUG_OUTPUT (set to off I thought) in my CMakeLists.txt. Removed that. Still no joy. Then, went to /usr/share/qt6/qtlogging.ini, and set <code>*.debug=true</code>. Then, the qDebug() logging worked correctly in the basic 4 line program, as well as the QtMessageHandler when added to the 4 line program(by the way, the big project doesn't use QtMessageHandler, though that might change :). But when I go to the big program, the console is completely flooded with all kinds of debug info with all things Qt related. Here's a sample.</p>
<pre><code class="language-qt.quick.layouts:">qt.quick.layouts: QQuickGridLayoutBase::rearrange 0 QQuickRowLayout(0x2456f2f0, id="sensorsWindow", parent=0x2456ecf0, geometry=0,0 0x80)
qt.quick.layouts: "" QQuickGridLayoutBase::rearrange() QSizeF(0, 80)
qt.quick.layouts: LEAVE QQuickLayout::ensureLayoutItemsUpdated() QQuickRowLayout(0x2456f2f0)
qt.quick.layouts: QQuickGridLayoutBase::rearrange 0 QQuickRowLayout(0x2456f2f0, id="sensorsWindow", parent=0x2456ecf0, geometry=0,0 0x80)
</code></pre>
<p dir="auto">I can disable this by setting <code>*.debug=false</code> but then I don't get any qDebug() logs. But now, the console fills up much too fast to even read the logs I want.</p>
]]></description><link>https://forum.qt.io/post/812201</link><guid isPermaLink="true">https://forum.qt.io/post/812201</guid><dc:creator><![CDATA[davidwedel]]></dc:creator><pubDate>Tue, 15 Oct 2024 18:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Tue, 15 Oct 2024 08:53:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davidwedel">@<bdi>davidwedel</bdi></a><br />
So start by writing a standalone 4 line program which uses <code>qDebug()</code> instead of that enormous project.  Then you will know whether there is some issue with <code>qDebug()</code> itself or maybe the flags you use to compile.  Assuming not then either there is something in your project's code or in the options/defines used to compile it.</p>
<p dir="auto">One thing you could check is whether your big project uses <a href="https://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler" target="_blank" rel="noopener noreferrer nofollow ugc">QtMessageHandler qInstallMessageHandler(QtMessageHandler handler)</a>.  That can be used to handle/redirect output from <code>qDebug()</code> and the other related macros.  It also mentions "<code>QT_NO_DEBUG_OUTPUT</code> have been set during compilation", check that is not the case.  If your code does not install a message handler do so now temporarily to see whether this is being called with <code>QtDebugMsg</code>.</p>
]]></description><link>https://forum.qt.io/post/812142</link><guid isPermaLink="true">https://forum.qt.io/post/812142</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 15 Oct 2024 08:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to qDebug() not working. on Tue, 15 Oct 2024 04:23:10 GMT]]></title><description><![CDATA[<p dir="auto">Update. I really don't know what to try next. I've edited the qtlogging.ini. I've tried to find the most basic QT/cpp applications online. Everything compiles and runs just fine. qWarning() and qInfo() work. But qDebug() will never show up. <code>std::cout &lt;&lt; "etc";</code>seems to work just fine.</p>
]]></description><link>https://forum.qt.io/post/812113</link><guid isPermaLink="true">https://forum.qt.io/post/812113</guid><dc:creator><![CDATA[davidwedel]]></dc:creator><pubDate>Tue, 15 Oct 2024 04:23:10 GMT</pubDate></item></channel></rss>