2. One of the main difference in Debug and Release is Optimization.
We can set this from Properties -> C/C++ -> Optimization.
By default, optimization is turned off in the Debug configuration of a Visual C++ program and turned on in the Release configuration.
Sometimes, however, a bug may appear only in an optimized version of a program. In that case, we must debug the optimized code.
Here are some techniques to test the application
- Set the mode Debug and Optimization level is should be same as Release and now run the application.
- Set the Release mode and change the Optimization level and run the application.
3. Check the _DEBUG macro in the code. where it is used and How it is used.
Look for any code that is inside of a "#ifdef _DEBUG" wrapper that might be needed in the Release version.
4. Sometimes Warnings are important.
When starting a project turn the warning level to "Level 3" or "Level 4" and make sure the code compiles with minimal or no warnings.