Guidelines and HOWTOs/Debugging: Difference between revisions

From KDE Community Wiki
(→‎Related Pages: Add Debugging DrKonqi)
(→‎Related Pages: Debugging linker errors)
Line 40: Line 40:
*[[/Debugging IOSlaves|Debugging IOSlaves]]
*[[/Debugging IOSlaves|Debugging IOSlaves]]
*[[/DrKonqi|Debugging DrKonqi (the KDE crash handler)]]
*[[/DrKonqi|Debugging DrKonqi (the KDE crash handler)]]
*[[/Linker_Errors|Debugging linker errors]]
*[[/MS Windows|Debugging on Microsoft Windows]]
*[[/MS Windows|Debugging on Microsoft Windows]]
*[[KDE/FAQs/Debugging_FAQ|Debugging FAQ]]
*[[KDE/FAQs/Debugging_FAQ|Debugging FAQ]]

Revision as of 08:13, 10 February 2023

Help Konqi to catch some bugs!

Debugging KDE applications can be done on different levels. Most applications "talk" invisibly through debug log statements while they are running. Looking at this information mostly gives you enough info to find out what went wrong. For further details, read the dedicated article about error messages.

On a different level we have post-mortem debugging. This is used after an application died, probably because of a programming error. The drkonqi dialog allows you to create a backtrace, and possibly find out where it went wrong.

There are debuggers like gdb which can do a lot more than just find out where it went wrong. You should read the man page of gdb to find out more, and possibly download an IDE which makes it simple to use gdb. Read Debugging with GDB for a detailed tutorial.

Tools

Valgrind

Valgrind helps to find memory leaks and uninitialized memory blocks. Additional features are a profiler and more. Valgrind is one of the most important development tools!

GNU Debugger (GDB)

GDB helps in debugging source code. GDB is a command line text user interface (TUI) application. Run gdb --tui for more TUI features such as a source code window. Graphical frontends are available (see below). See also the debugging tutorial Debugging with GDB.

Text user interface (TUI) frontends to GDB

The Emacs text editor has M-x gdb, gud, realgud.

Graphical user interface (GUI) frontends to GDB

Integrated Development environments (IDEs) such as Qt Creator, Microsoft Visual Studio Code, KDevelop, JetBrains CLion etc. contain a debugger which is a GUI wrapper over GDB.

There are other applications which are GUI frontends to GDB such as KDbg.

Microsoft Windows tools (Process Explorer, Console, WinDbg, DebugView, Process Monitor, Depends, Ilspy etc.)

More information is available on the KDE on Windows page.

Related Pages