Skip to content

Debugging

Hoël Vasseur edited this page Jun 29, 2016 · 1 revision

Debugging OpenVivoe

OpenVivoe uses the Gnome Library: GLib. This library provides a powerful way to display warning, error, information and debug messages to the user. OpenVivoe takes advantage of this mechanism. By default, only only warning, critical and error message are displayed to the user while running (so you should not see anything ;) ).

Enable debug messages

To enable Debug and Information messages you need to set the global variable G_MESSAGES_DEBUG to all, and launch OpenVivoe. sudo G_MESSAGES_DEBUG=all bin/Debug/openvivoe

The output will look something like:

sceenshot Debug messages in OpenVivoe

Between the brackets you will find the date and time, then the name of the program and its PID, then there is the message's category (INFO, DEBUG, MESSAGE, WARNING, CRITICAL, ERROR), and then the message itself.

You can even used all global variable coming with the Glib, a preview of what can be done can be found here:https://developer.gnome.org/glib/stable/glib-running.html