DebugLibprovides macros that can be used to insert debug code into a checked build. This debug code can greatly reduce the amount of time it takes to root cause a bug. These macros are typically enabled only for debug builds and disabled in production builds so as to not take up any executable space. The macros available through the DebugLib include:
ASSERT_PROTOCOL_ALREADY_INSTALLED (Handle, Guid
DEBUG ((ErrorLevel, Format,. .
DEBUG_CLEAR_MEMORY (Address, Length
CR (Record, TYPE, Field, Signature
MdePkgdocumentation available from http://www.tianocore.org. The ErrorLevel parameter passed into the
DEBUG()macro allows a UEFI driver to assign a different error level to each debug message, which allows debug messages to be filtered. The DSC files required to build a UEFI Driver can be used to set the ErrorLevel filter mask. The UEFI Shell also supports the
Errcommand that allows the user to set the error level filter mask.