20

I am using GTK.3.15. When attempting to open GTK Inspector using the Ctrl+Shift+I or Ctrl+Shift+D, nothing happens. Does not matter what application or widget I am using. Nothing happens

and my understanding is that this option comes standard on GTK 3.15. Does anyone know how

to use this tool in GTK 3.15?

  • Did you tried with my answer? – Helio Mar 21 '15 at 18:09
  • The dconf-editor does not have the debug feature that you speak of. I did attempt to update the application but Ubuntu tells me that I have the newest version installed. I do appreciate your help though. It looks like I will have to wait a few weeks for the release of Ubuntu 15.04. – Adam Mar 22 '15 at 13:21
  • Sorry, I didn't put arrows in my answer. I meant org > gtk > Settings > Debug. I think that – Helio Mar 22 '15 at 13:24
  • No arrows were needed. I understood exactly what you were telling me. – Adam Mar 22 '15 at 13:27
  • I tried it on my computer and it couldn't find debug entry. However, did it work the 2nd method? – Helio Mar 22 '15 at 13:27
15

I got this from https://wiki.gnome.org/Projects/GTK%2B/Inspector:

GtkInspector is the built-in interactive debugging support in GTK+. It was added in GTK+ 3.14, based on a copy of the well-estabished gtkparasite.

The debugger is disabled by default. To enable it run in a terminal:

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

And launch it pressing on the keyboard Control-Shift-I or Control-Shift-D.

If you don't want to use the shortcuts, you can also run it temporarily directly when running your app with:

GTK_DEBUG=interactive your-app

Looking further, I found Bug #1523929 which indicates that users can install libgtk-3-dev which then provides the schema. Note that installing libgtk-3-dev may bring in a lot of dependencies.

  • 1
    How do I open the inspector in browser that use ctrl+shit+i (or ctrl+shift+d) as shorcuts for other tasks? – euDennis Apr 1 '17 at 21:37
  • 2
    I can't inspect even after installing libgtk-3-dev. Looked in the help menu, no inspector help. Looked in key bindings and no option for opening the inspector. – Costa Nov 18 '18 at 19:54
9

Method 1:


Enable the shortcut:

  1. Install dconf-editor with sudo apt-get install dconf-editor
  2. Navigate to org > gtk > settings > debug
  3. Set enable-inspector-keybinding to true
  4. Try the shortcut.

Method 2:


Run the program to debug with the GTK_DEBUG variable:

Instead of running the program to debug as usual (myprogram --argument) you only need to run it of this way (GTK_DEBUG=interactive myprogram --argument)

Also you can export that variable with export GTK_DEBUG=interactive and then run the program.

  • No it's not necessary to reboot or to log out+in after using dconf. If you ever find a case where a dconf change doesn't "take" until you re-login, it's a bug. Report it. – Matthias Urlichs May 8 '18 at 11:31
  • dconf is missing Debug for me. Ubuntu 18.04. – Costa Nov 18 '18 at 19:46
  • 2
    This didn't work for me even after installing libgtk-3-dev. I'm on Ubuntu 18.04 with Gnome 3.28.3 – Costa Nov 18 '18 at 19:55
  • This seems to be the last documentation: wiki.gnome.org/Projects/GTK+/Inspector – Helio Nov 19 '18 at 21:03
  • I'm a bit puzzled – Helio Nov 19 '18 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.