gdebugcontroller: Add debug controller API and D-Bus implementation

This is intended to provide a uniform interface for controlling whether
the debug output from an application (or service) is emitted, typically
to journald, but actually to wherever the application chooses to output

The main implementation of `GDebugController` is `GDebugControllerDBus`,
which is intended to be used on Linux. Other implementations may be
added in future for other platforms, or larger applications may want to
provide their own implementation which integrates with their ecosystem.

The `GDebugControllerDBus` implementation exposes a D-Bus interface at
`/org/gtk/Debugging` with a method to enable or disable debug
output at runtime.

This could be used by external harnesses, such as GNOME Builder or
systemd, to give a uniform way to get debug output from an application.

Signed-off-by: Philip Withnall <>

Fixes: #1190
12 jobs for 1190-debug-interface in 33 minutes and 45 seconds (queued for 4 seconds)