Do qDebug statements degrade app performance? - Qt
-
Hi,
I have lot of debug statements in my Qt project. The app randomly hangs and crashes. I was wondering if the qDebug statements are degrading the app performance in any manner.
Please suggest.
Thanks
-
I've never had problems with qDebug at all.
Are you sure the app isn't crashing because of bad pointers?
-
Actually i am not. Its the most likely cause but just wanted to be sure about qDebug statements. Thanks
-
Thanks Gerolf but do they even execute when I am using the app on the phone while I am not debugging?
-
They execute even if you build your app in release mode. You can even reroute output using qInstallMsgHandler() to write it in file, or send it through network, etc...
-
Hi,
You can define QT_NO_DEBUG_OUTPUT before compiling so that qDebug does nothing