[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    Re: [Kde-edu-devel] kdDebug() question
From:       Ewald Arnold <kvoctrain () ewald-arnold ! de>
Date:       2001-11-10 8:31:13
[Download RAW message or body]

Hello Jason,

> However, I don't see any debug messages when I use kdDebug()!  Nothing at
> all gets printed to stderr.  Can anyone help?

Here is what I found in the faqs at 
http://developer.kde.org/documentation/other/developer-faq.html#102

--snip

Q: Is there a preferred way to print debug output on stderr ? Yes, you must 
use kdDebug():
kdDebug() << "KMyApp just started" << endl; 

The syntax is much like cout, you can use many native types between the "<<". 
This will print out a debugging message, which will automatically be turned 
off at release time (by --disable-debug). In case you want the message to 
still be there during releases, because it's a warning or an error, use 
kdWarning() or kdError().

Components and libraries are advised to use a debug area number, as in 
kdDebug(1234). This makes it possible to turn off or on the debug output for 
this area number, using the "kdebugdialog" program, which is part of kdebase. 
"kdebugdialog --fullmode" also permits to control where to log debug output.

To make it clear: do NOT use qDebug(), this one doesn't get disabled at 
releases. Also avoid using assert() or kdFatal() which lead to a crash when 
something goes wrong, never nice for the user. Better detect the error, 
output a kdWarning or kdError, and recover if possible.

--snap

The last time I really used the kdebug feature there was also a key shortcut 
(Shift-F12?) in all applications. Does anyone know if this has completely 
disappeared?

Ewald

-- 
Ewald Arnold, Germany
http://www.ewald-arnold.de/
mailto:ewald at ewald-arnold.de
mobil/sms:+49-162-8001240

_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic