Skip to content

Debugging with GtkInspector

Vincent Magnin edited this page Apr 18, 2024 · 3 revisions

GtkInspector is an incredible interactive debugging tool for your GTK applications. In GTK 4, it is activated by default. In GTK 3, type:

$ gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true

Launch your GTK application and put the focus on it. Press CTRL+SHIFT+D to launch the GtkInspector (or CTRL+SHIFT+I to directly inspect the widget under the mouse cursor). Or you can set this environment variable at launch:

$ GTK_DEBUG=interactive ./my_gtk_program

You can see and edit on the fly the properties of each widget, you can change the graphical theme, you can zoom on a widget, edit the CSS properties, and many other things.

External tutorials

Clone this wiki locally