Guidelines and HOWTOs/Gammaray: Difference between revisions

From KDE Community Wiki
(Create page)
 
No edit summary
Line 2: Line 2:


A video version is available https://www.youtube.com/watch?v=W6dVfn1nAzI
A video version is available https://www.youtube.com/watch?v=W6dVfn1nAzI
Both gammaray and the app that you want to inspect should use the exact same version of Qt. E.g. install both gammaray and the app that you want to inspect from your Linux OS' packages.
If you have built Qt using kdesrc-build or if you have installed Qt using the app "Qt online installer", you should build gammaray using kdesrc-build.
E.g. we have built using kdesrc-build Qt6, kcalc and gammaray. We run in Konsole tab:
<pre>
kdesrc-build --run kcalc
</pre>
In another Konsole tab:
<pre>
source ~/kde/build/kconfig/prefix.sh
gammaray
</pre>
The window "GammaRay Launcher" is shown. From the "Attach" tab, select "/home/user/kde/usr/bin/kcalc".
At this point, gammaray might fail to connect to the process kcalc and show the error dialog:
<pre>Launcher Error
gdb: Yama security extension is blocking runtime attaching, see /proc/sys/kernel/yama/ptrace_scope
lldb: The debugger executable 'lldb' could not be found
Uh-oh, there is no default attach injector on this platform.
See https://github.com/KDAB/GammaRay/wiki/Known-Issues for troubleshooting</pre>
As per https://github.com/KDAB/GammaRay/wiki/Known-Issues#gdb-method-fails-to-attach-to-running-process

Revision as of 20:14, 23 May 2024

KDAB GammaRay is a GUI app that allows you to inspect a running GUI app that uses Qt widgets or Qt QML. See https://github.com/KDAB/GammaRay and https://www.kdab.com/gammaray .

A video version is available https://www.youtube.com/watch?v=W6dVfn1nAzI

Both gammaray and the app that you want to inspect should use the exact same version of Qt. E.g. install both gammaray and the app that you want to inspect from your Linux OS' packages. If you have built Qt using kdesrc-build or if you have installed Qt using the app "Qt online installer", you should build gammaray using kdesrc-build.

E.g. we have built using kdesrc-build Qt6, kcalc and gammaray. We run in Konsole tab:

kdesrc-build --run kcalc

In another Konsole tab:

source ~/kde/build/kconfig/prefix.sh
gammaray

The window "GammaRay Launcher" is shown. From the "Attach" tab, select "/home/user/kde/usr/bin/kcalc".

At this point, gammaray might fail to connect to the process kcalc and show the error dialog:

Launcher Error
gdb: Yama security extension is blocking runtime attaching, see /proc/sys/kernel/yama/ptrace_scope
lldb: The debugger executable 'lldb' could not be found
Uh-oh, there is no default attach injector on this platform.
See https://github.com/KDAB/GammaRay/wiki/Known-Issues for troubleshooting

As per https://github.com/KDAB/GammaRay/wiki/Known-Issues#gdb-method-fails-to-attach-to-running-process