Debug version of code contains additional debug code and debug information. They are needed for debugging on source code level.
Also Release version may be more optimized and it's more hard to read it. Release profile usually disable adding debug information, so you will be unable to debugging it on source code level.
This happens with any compiler. Usually you can select your own optimization settings for Debug and Release profile. So, technically you can enable debug information and disable speed/size optimizations for Release profile.
The meaning of the profiles is to quickly switch between different compilation settings. Usually there are two profiles - Debug and Release. First is used for development and debug, the second for release. But you can add another profile in case of needs.