// HEL Library \\

 
Main Page | Modules | Related Pages

Debug Message Output

HEL provides an easy to use mechanism to output formatted debug messages, which are automatically turned off when you switch to releasemode.

The Debug-Message-System currently supports NO$GBA and VisualBoy Advance. Activating one or the other is easiely done:

HEL_DEBUG_MSG_TYPE_NOCHASH is the default setting when you just installed HEL.

Example:

The following example shows how to switch to VisualBoy Advance support. Once you have hel.h infront of you and scrolled a few lines down, you see:

//#define HEL_DEBUG_MSG_TYPE_VBA
#define HEL_DEBUG_MSG_TYPE_NOCHASH

As you can see, at this time NO$GBA support is activated. To activate VBA, change it to:

#define HEL_DEBUG_MSG_TYPE_VBA
//#define HEL_DEBUG_MSG_TYPE_NOCHASH

Usage:

To make use of Debug-Messages in your project, all you need is HEL_DEBUG_MSG. It does not matter what Debug-System you activated (NO$GBA or VBA), just use HEL_DEBUG_MSG. Everything else is done for you automatically!

Macro:

HEL_DEBUG_MSG(txt, args...)

Parameter:

txt    : Format-control string
args   : Optional arguments

Example:

HEL_DEBUG_MSG("Hello World\n");
HEL_DEBUG_MSG("I am %d years old.\n", 28);

Output:

Hello World
I am 28 years old.

Remarks:

HEL's Debug-Message-System only works, as the name already says, in Debug-Mode. To switch between Debug and Release-Mode, please see Debug and Release Library mystery. Another important part is to know that VisualBoy Advance Debug-Messages do not work on hardware! They freeze the GBA! Having Debug-Messages enabled when using it outside an emulator makes no sense anyway.

Requirements:

NO$GBA shareware or professional version, freeware version does not support debugmessages! VisualBoy Advance SDL (commandline tool).

See also:
Assertion Checking

Generated on Fri Jul 8 19:55:49 2005 by DoxyGen 1.4.3