Guidelines and HOWTOs/Debugging: Difference between revisions
No edit summary |
(→Graphical user interface (GUI) frontends to GDB: kdbg uses KDE Frameworks 5) |
||
(16 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
[[File:Mascot konqi-support-bughunt.png|thumbnail|right|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 [[/Using Error Messages|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|Debugging with GDB]] for a detailed tutorial. | |||
== Tools == | |||
=== Valgrind === | |||
[[/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) === | |||
[https://www.sourceware.org/gdb/ GDB] helps in debugging source code. GDB is a command line text user interface (TUI) application. Run <code>gdb --tui</code> for more TUI features such as a source code window. Graphical frontends are available (see below). See also the debugging tutorial [[/Debugging with GDB|Debugging with GDB]]. | |||
=== Text user interface (TUI) frontends to GDB === | |||
The Emacs text editor has [https://faculty.kutztown.edu/spiegel/debugging/debugprimer.htm M-x gdb], [https://www.gnu.org/software/emacs/manual/html_node/emacs/Starting-GUD.html gud], [https://github.com/realgud/realgud 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 [[Windows|KDE on Windows page]]. | |||
== Related Pages == | == Related Pages == | ||
*[[/Debugging with GDB|Debugging with GDB]] | |||
*[[/How to create useful crash reports|How to create useful crash reports]] | |||
*[[/Using Error Messages|Logging in KDE applications]] | |||
*[[/QML|Debugging QML]] | |||
*[[Plasma/Debugging | Debugging Plasmashell and widgets]] | |||
*[[KWin/Debugging | Debugging KWin X11 and Wayland]] | |||
*[[/Shared Memory Usage in KDE|Shared Memory Usage in KDE]] | *[[/Shared Memory Usage in KDE|Shared Memory Usage in KDE]] | ||
*[[/Valgrind|Debugging with Valgrind]] | *[[/Valgrind|Debugging with Valgrind]] | ||
*[[/KCM|Debugging KCM (System Settings modules)]] | |||
*[[/Debugging IOSlaves|Debugging IOSlaves]] | *[[/Debugging IOSlaves|Debugging IOSlaves]] | ||
*[[/MS Windows|Debugging on | *[[/Debugging KIO Workers|Debugging KIO Workers]] | ||
*[[/DrKonqi|Debugging DrKonqi (the KDE crash handler)]] | |||
*[[/Linker_Errors|Debugging linker errors]] | |||
*[[/MS Windows|Debugging on Microsoft Windows]] | |||
*[[KDE/FAQs/Debugging_FAQ|Debugging FAQ]] | *[[KDE/FAQs/Debugging_FAQ|Debugging FAQ]] | ||
*[[/ | *[[/Debugging symbols|Debugging symbols]] | ||
*[[PIM/Akonadi/Debug_IMAP | Debugging IMAP for Akonadi/KMail]] | |||
*[[Baloo/Debugging | Debugging Baloo and search]] | |||
*[[/Phonon|Debugging Phonon]] | *[[/Phonon|Debugging Phonon]] | ||
*[https://fedoraproject.org/wiki/KDE/Debugging Fedora wiki on debugging KDE] | |||
[ |
Latest revision as of 18:24, 26 October 2024
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
- Debugging with GDB
- How to create useful crash reports
- Logging in KDE applications
- Debugging QML
- Debugging Plasmashell and widgets
- Debugging KWin X11 and Wayland
- Shared Memory Usage in KDE
- Debugging with Valgrind
- Debugging KCM (System Settings modules)
- Debugging IOSlaves
- Debugging KIO Workers
- Debugging DrKonqi (the KDE crash handler)
- Debugging linker errors
- Debugging on Microsoft Windows
- Debugging FAQ
- Debugging symbols
- Debugging IMAP for Akonadi/KMail
- Debugging Baloo and search
- Debugging Phonon
- Fedora wiki on debugging KDE