---
name: "rdebug"
section: "3"
platform: "linux"
package: "libroy-dev"
version: "1.0.8-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/rdebug"
---

# rdebug(3)

Roy debug message facility

## NAME

rdebug - Roy debug message facility

## SYNOPSIS

\#include \<roy.h\>

void rdebug\_enable (char \*domains);

RDEBUG ((char \*domain, char \*format, ...));

## DESCRIPTION

[*rdebug*(3)](/rdebug/3.md) implements a simple messaging facility that can be left in the code, and turned on at will. the *RDEBUG* macro is used to insert debugging messages into the code with different domains. These messages can then be turned on via a call to *rdebug\_enable()*.  The rdebug messages inserted via the macro can be compiled out in production code by defining RDEBUG\_DISABLE during compile.

A call to *rdebug\_enable()* enables Roy debugging facilities, and any messages matching those in the *domains* argument will be printed to the screen.  *domains* is a comma seprated list of domains to debug.

RDEBUG inserts a debug message to be printed. The *domain* argument is the domain to which this message belongs - we usually just use the filename the call appears in.  The *format* argument is a [*rbuf\_sprintf*(3)](/rbuf_sprintf/3.md) style format string (identical to [*printf*(3)](/printf/3.md) with the addition of RBufs).

Note that double parentheses are used in RDEBUG to enable the call to be compiled out.

## RETURN VALUES

This function and macro have no return values.

## ERRORS

These functions can produce no errors.

## SEE ALSO

[*roy*(3)](/roy/3.md), [*rbuf\_sprintf*(3)](/rbuf_sprintf/3.md)
