1# Linux Debugging GTK 2 3## Making warnings fatal 4 5See 6[Running GLib Applications](http://developer.gnome.org/glib/stable/glib-running.html) 7for notes on how to make GTK warnings fatal. 8 9## Using GTK Debug packages 10 11 sudo apt-get install libgtk-3-0-dbg 12 13Make sure that you're building a binary that matches your architecture (e.g. 1464-bit on a 64-bit machine), and there you go. 15 16### Source 17 18You'll likely want to get the source for gtk too so that you can step through 19it. You can tell gdb that you've downloaded the source to your system's GTK by 20doing: 21 22```shell 23$ cd /my/dir 24$ apt-get source libgtk-3-0 25$ gdb ... 26(gdb) set substitute-path /build/buildd /my/dir 27``` 28 29NOTE: I tried debugging pango in a similar manner, but for some reason gdb 30didn't pick up the symbols from the symbols from the `-dbg` package. I ended up 31building from source and setting my `LD_LIBRARY_PATH`. 32 33See [building_debug_gtk.md](building_debug_gtk.md) for more on how 34to build your own debug version of GTK. 35 36## Parasite 37 38http://chipx86.github.com/gtkparasite/ is great. Go check out the site for more 39about it. 40 41Install it with 42 43 sudo apt-get install gtkparasite 44 45And then run Chrome with 46 47 GTK_MODULES=gtkparasite ./out/Debug/chrome 48 49## GDK_DEBUG 50 51Use `GDK_DEBUG=nograbs` to run GTK+ without grabs. This is useful for gdb 52sessions. 53