Guidelines and HOWTOs/Debugging: Difference between revisions

From KDE Community Wiki
(Only two wiki pages in Category:Programming)
 
(3 intermediate revisions by 2 users not shown)
Line 21: Line 21:


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.
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 [http://www.kdbg.org/ KDbg].


=== Microsoft Windows tools (Process Explorer, Console, WinDbg, DebugView, Process Monitor, Depends, Ilspy etc.) ===
=== Microsoft Windows tools (Process Explorer, Console, WinDbg, DebugView, Process Monitor, Depends, Ilspy etc.) ===
Line 39: Line 37:
*[[/KCM|Debugging KCM (System Settings modules)]]
*[[/KCM|Debugging KCM (System Settings modules)]]
*[[/Debugging IOSlaves|Debugging IOSlaves]]
*[[/Debugging IOSlaves|Debugging IOSlaves]]
*[[/Debugging KIO Workers|Debugging KIO Workers]]
*[[/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]]

Latest revision as of 18:24, 26 October 2024

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.

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