debug (macro)

This macro is used to conditionally include code in the DEBUG build of the FM or FM emulation.

By placing the statements inside the debug macro, the statements will appear only in the DEBUG build and will not be present in the Release build.

Synopsis

debug( statements )

Example

rv = funct();
debug( if ( rv ) dbg_print(“Error %x from func\r\n”, rv); )
if ( rv ) return rv;

In this example, the error message will only be displayed if the code is compiled for DEBUG and funct() returns an error code.