Debug mode won't perform certain optimisations (such as inlining functions), in order to make debugging easier. It also defines the
DEBUG
and
_DEBUG
macros which you can use to run code only in debug mode, like so:
#if _DEBUG
ALERT( at_error, "This code won't run in release mode!\n" );
#endif
Release mode is intended for the "final build" of your mod that you release, which will enable performance optimisations and disable the debug-only code or messages.
If you're using the standard unmodified SDK, compiling in release mode doesn't make much of a big difference - but Spirit of Half-Life will do things in debug mode that you definitely don't want in release mode, such as showing sparks above an NPC when they don't have a valid schedule.
As a general rule:
- Compile in debug mode during development
- Compile in release mode for test/final release