Defines | |
#define | HEL_DEBUG_MSG(txt, args...) |
Output a string into Debug-Message-Output window. | |
Functions | |
void | hel_DebugSetMessageType (u32 MessageType) |
Select debug message type. |
HEL Library provides an easy to use mechanism to output formatted debug messages, which are automatically turned off when you switch to release mode.
The Debug-Message-System supports no$gba and VisualBoy Advance Debug-Messages. The maximum supported debug message string length is 120 characters. If you pass a text that is longer than that, HEL Library will display an assertion screen and abort program execution (in debug mode). However, if you have a construct like below, where pszLongText
points to a text that is longer than 120 characters, HEL does not display an assertion screen and it is very likely that memory gets overwritten at some random address and this leads to hard to find bugs:
HEL_DEBUG_MSG("%s", pszLongText);
As earlier mentioned, HEL Library supports no$gba and VisualBoy Advance Debug-Messages. To activate on of those, simply use hel_DebugSetMessageType.
NO$GBA Debug-Messages require either the shareware or full version of NO$GBA.
#define HEL_DEBUG_MSG | ( | txt, | |||
args... | ) |
Output a string into Debug-Message-Output window.
The HEL_DEBUG_MSG macro can be used to output debug messages.
[in] | txt | Format-control string. |
[in] | args | Optional arguments |
HEL_DEBUG_MSG("Hello World\n"); HEL_DEBUG_MSG("I am %d years old.\n", 28);
The preceding code will output:
Hello World I am 28 years old.
void hel_DebugSetMessageType | ( | u32 | MessageType | ) |
Select debug message type.
The hel_DebugSetMessageType selects the debug message output for either VisualBoy Advance or no$gba emulator. To turn off debug messages completely, you must rebuild the project in release mode. See Library Overview for more details on this.
[in] | MessageType | Message type to activate. This can be one of the following:
|