Debug builds should contain assert testing that are only enabled when the pre-processor flag `NDEBUG` is defined. This should be fairly easy. The code should be in it's own C Static Lib and compiled in the main program or in dispLib if the flag is set.