There is a tool for inspecting Qt apps - GammaRay from KDAB
It can be very convenient to investigate QQuickItem
s hierarchy in the app.
Steps to build it (inside cloned src folder):
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=PATH_TO_YOUR_QT_FOLDER/5.12.2/gcc_64/lib/cmake ..
make
make install
After build gammaray
binary can be found in GAMMARAY_PATH/build/bin
- Start
gammaray
- Open
Attach
tab ingammaray
UI - Set
Access mode
combo box toOut-of-process, local debugging only
- Start your
react-native-desktop
application - Wait until it is listed in processes on gammaray
Attach
screen - Press
Attach
button - Wait until
gammaray
attached - Select
Quick scenes
tab and inspect QQuickItems hierarchy in your app
If you get a error on attaching gammaray
to app, here is what can be done:
-
edit
/etc/sysctl.d/10-ptrace.conf
and change the line:kernel.yama.ptrace_scope = 1
Tokernel.yama.ptrace_scope = 0
-
To apply changes call
sudo service procps restart