# KDebugDialog

&kdebugdialog; is a dialog box for managing diagnostic messages at runtime. It features a simple and a full mode.

In order to be able to make changes Disable all debug output has to be unchecked.

Only for applications using the Frameworks library kdelibs4support.

kDebug() has been deprecated in &kde; Frameworks 5, in favour of &Qt;'s builtin categorized logging, seeQLoggingCategory. Use the program kdebugsettings to enable/disable qCDebug.

Simple mode

- If you simply start `kdebugdialog5`, you will see a list of areas, that can be disabled or enabled. A `kDebug(area)` call in the code will show something in the debug output only if the area is enabled.

  Note that kWarning, kError and kFatal always appear, they are NOT controlled by this setting.

  Enter a matching string into the Search box at the top of the list, this allows you to filter the areas which are displayed in the list view. Use the buttons below the list to select or deselect all items in the view (the other areas are not effected) or change the debug output for a single item using the check box in front of it.

Full mode

- If you start `kdebugdialog5` `--fullmode`, then for every severity level you can define separately what should be done with the diagnostic messages of that level, and the same for each debug area.

  In full mode, first you should select the debug area you are interested in from the list at the left of the dialog using the search box at the top of the list.

  You may independently set the output for various types of messages:

  - Information

  - Warning

  - Error

  - Fatal Error

  For each of these types, you can set the following:

  Output to:

- In this Combobox, you can choose where the messages should be output. The choices are: File, Message Box, Shell (meaning stderr) and Syslog. Please do not direct fatal messages to syslog unless you are the system administrator yourself. The default is Shell.

Filename:

- This is only enabled when you have chosen File as the output and provides the name of that file (which is interpreted as relative to the current folder). The default is `kdebug.dbg`.

Apart from this, you can also tick the check box Abort on fatal errors. In this case, if a diagnostic message with the severity level `KDEBUG_FATAL` is output, the application aborts with a SIGABRT after outputting the message.

When you close the dialog by pressing OK, your entries apply immediately and are saved in `$`XDG_CONFIG_HOME`/kdebugrc` (~/.config/kdebugrc by default). When you press Cancel, your entries are discarded and the old ones are restored.

Credits to Kalle Dalheimer for the original version of &kdebugdialog;

&underFDL;