1 The GLIB, GDK, and GTK libraries have extensive support for
2 debugging the library and your programs.
4 The amount of debugging being done can be determined both
5 at run time and compile time.
10 At compile time, the amount of debugging support included is
11 determined by four macros:
14 If set, enable support for runtime checking.
17 If set, disable g_assert macros
20 If set, disable the g_return_if_fail and g_return_val_if_fail macros
23 If set, don't check casts between different object types
26 Whether these macros are defined is controlled at configuration
27 time by the --enable-debug option.
29 --enable-debug=minimum [default]
30 Enable only inexpensive sanity checking
31 sets GTK_NO_CHECK_CASTS
34 Enable all debugging support
37 --enable-debug=no (or --disable-debug)
38 Disable all debugging support (fastest)
39 sets G_DISABLE_ASSERT, G_DISABLE_CHECKS, and GTK_NO_CHECK_CASTS
41 Note that !G_DISABLE_CHECKS and --enable-debug=no are to be considered
42 not only fast, but dangerous as they tend to destabilize even mostly
43 bug-free software by changing the effect of many bugs from simple warnings
44 into fatal crashes. Thus --enable-debug=no should *not* be used for
45 stable releases of gtk+.
51 At run time, if GTK+ was compiled with debugging enabled, different
52 types of debugging information can be printed out. This is controlled
55 GTK_DEBUG and GDK_DEBUG environment variables
56 --gtk-debug and --gdk-debug command line options
57 --gtk-no-debug and --gdk-no-debug command line options
59 First the environment variables are applied, then the command line
60 options are applied in the order given on the command line.
62 Each of these can either be the special value 'all', or a sequence of
63 ':' separated options. (case is ignored). The environment variables
64 and the --gtk-debug and --gdk-debug options add debugging options and
65 the --gtk-no-debug and --gdk-no-debug options remove them.
67 As noted below, some of these are useful in application debugging, but
68 most are only interested to those debugging the libraries
72 GDK_DEBUG_FLAGS=misc:dnd testgtk --gdk-no-debug dnd --gdk-debug events
74 runs testgtk with the 'misc' and 'events' debugging options.
76 See glib/docs/debugging.txt for information about debugging signal emission
77 and the object system.
83 Application relevant options:
85 'events' - Show all events received by GTK
87 Options only interesting to library maintainers:
89 'misc' - Miscellaneous information
90 'dnd' - Information about drag-and-drop
91 'xim' - Information about X Input Method support
97 Options only interesting to library maintainers:
99 'misc' - Miscellaneous information
100 'text' - Information about text widget internals
101 'tree' - Information about tree widget internals
102 'updates' - Visual feedback about window updates
105 - 2001-08-13 Matthias Clasen
106 - 98/02/19 Owen Taylor