Code::Blocks defines two default build targets—debug and release at the time of a project creation.
As the name suggests a debug target is suitable for app debugging. Appropriate compiler options are added to generate debugging symbols in the compiled app. It also disables all program optimizations.
We can find in the following screenshot (navigate to Project | Build options… menu option) a Debug target has a compiler option Produce debugging symbols. This instructs compiler to generate debugging symbols, which allows app debugging:
A Release target disables generation of debugging symbols. It also defines appropriate compiler options to optimize the program. Thus this is suitable for code to be used in production. The following screenshot shows typical compiler flags in a release target.