kdebug

Thiago Macieira thiago at kde.org
Thu Aug 2 14:17:50 BST 2007


Thomas Zander wrote:
>This makes it a lot easier to write debugging again, but there is this
>nasty conversion period where we have duplicate spaces. And in the final
>release the kDebug() call will always print an linefeed so if you still
>do that in your software you'll get a duplicate.

Technically, in the release kDebug will print nothing, since it's only 
debugging :-)

Please make sure that calls to kWarning, kError and kFatal are cleaned up. 
Those show in the output.

Also, through some ifdef magic, kDebug will not even be executed when 
compiled in release mode. So please be careful with calls with 
side-effects, since they will not be executed in the first place. The 
same goes for Q_ASSERT.

One final thing: I've been toying with the idea of an "extended debug 
output", which will print the program's name, PID, the function name, 
source file and line number. That would make k_funcinfo unnecessary, 
since all of that information is already included.

I know it's a PITA when you look at your ~/.xsession-errors and see:
	QObject: unexpected null object
and you have no idea which program that might be coming from!
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070802/02415fdc/attachment.sig>


More information about the kde-core-devel mailing list