Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visually debug GTK3 applications (GtkInspector / gtkparasite)

Trying to debug a GTK theme, I modified. Having corrected most of the issues with the theme, I Still cannot figure out, what color setting is responsible for background color in some input-fields or text-views.

SETUP

I can start GtkInspector as well as gtkparasite with Gtk3 applications (starting those debuggers as described on the given pages).

I'm sure, the debugger attached to the right application, because I can

  • change the program's theme
  • show graphic updates
  • show pixel cache ...

PROBLEM

In the left selection pane (widget-treeview expected) is only one element: "GtkSettings"

Tried with:

  • meld
  • synaptic
  • wireshark
  • zenity --calendar

EXPECTED BEHAVIOR:

Be able to

  • select widgets either from the missing widget-treeview, or when locating them with the 'target button'
  • examine and change their parameters

SYSTEM INFORMATION

OS & all programs / packages: Debian 8 x86_64 (up-to-date: 09.01.2015)

QUESTION

  1. How can I debug my GTK-theme?

  2. Does anyone else experience problems with the GtkInspector (is this a bug)?

like image 873
Florian Avatar asked Jan 09 '15 12:01

Florian


People also ask

How to debug GTK?

It is meant as a complement to full-blown debuggers and system tracing facilities such as DTrace, not as a replacement. To enable the GTK inspector, you can use the Control + Shift + I or Control + Shift + D keyboard shortcuts, or set the GTK_DEBUG=interactive environment variable.

How to open GTK in ubuntu?

To launch the GTK Inspector, focus your GTK application and press Control-Shift-D. Alternatively, move your mouse cursor to your desired widget and press Control-Shift-I to specifically inspect the widget under the mouse cursor.


2 Answers

I had the same problem with GtkInspector on Debian Jessie and I solved it by calling terminal and typing next :

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

this enables GtkInspector shorcut buttons just run your application and press

Control-Shift-I or Control-Shift-D 

I hope it helps

like image 111
harisk92 Avatar answered Oct 05 '22 22:10

harisk92


https://wiki.gnome.org/Projects/GTK%2B/Inspector misses to tell people to install "libgtk-3-dev"!!!

  1. Install the package [https://packages.debian.org/search?arch=amd64&keywords=libgtk-3-dev libgtk-3-dev]
  2. Start from terminal with:

    GTK_DEBUG=interactive gedit/gnome-terminal/nautilus/etc

like image 29
guest_user_76246821634 Avatar answered Oct 05 '22 22:10

guest_user_76246821634