Howto see kDebug messages from apps

Ralf Habacker ralf.habacker at freenet.de
Sat Dec 22 20:19:01 CET 2007


Ralf Habacker schrieb:
> Ralf Habacker schrieb:
>   
>> Andreas Pakulat schrieb:
>>   
>>     
>>> On 22.12.07 17:14:47, Christian Ehrlicher wrote:
>>>   
>>>     
>>>       
>>>> Andreas Pakulat schrieb:
>>>>     
>>>>       
>>>>         
>>>>> Hi,
>>>>>
>>>>> according to:
>>>>> http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_on_MS_Windows
>>>>>
>>>>> I shhould be able to see all the kDebug() messages from all kde apps
>>>>> when running debugview. However I only seem to be able to get a few Qt
>>>>> messages, none of those that are printed by kdevelop for example.
>>>>>
>>>>> Is there anything I need to setup in Debugview to make this work? I
>>>>> did compile Qt and all KDE4 stuff in Debug mode and kdebugdialog also
>>>>> shows almost all areas activated
>>>>>
>>>>>       
>>>>>         
>>>>>           
>>>> This looks like a mingw problem. All debug output is printed with
>>>> OutputDebugMessage(). Maybe this is not true for mingw?
>>>>     
>>>>       
>>>>         
>>> What does Qt do? I get the Qt messages as far as I can see, but none of
>>> the kde messages. 
>>>     
>>>       
>> debug message may be disabled in the installed file 
>> share/config/kdebugrc  from kdelibs. You may use kdebugdialog from 
>> kdebase to enable them.
>> Additional it may be that no debug messages are generated when apps are 
>> compiled with RelWithDebInfo.
>>   
>>     
> one additional note: kdebugtest from kdecore prints only a little subset 
> of the message it should, so it looks that there is something wrong in the kdebug code.
>   
Got the reason. it is because QT_NO_DEBUG is set for RelWithDebInfo 
build mode.

If one prepends

#include <QtCore/QDebug>
#undef QT_NO_DEBUG

before the line
#include "kdebug.h"

all debug messages are printed.

The question is now how to enable this messages in RelWithDebInfo build 
mode.

BTW: #undefining QT_NO_DEBUG requires to recompile all code of which 
debug messages should be printed.

Ralf




More information about the Kde-windows mailing list