Comparing Debug and Release configurations (or any other two configurations) is not easily done with visual studio. However, there is a way to do it reasonably easily, since all the configurations setting applied to a C++ project are translated to command line switches passed on to the compiler or linker tools.
This method allows easy comparison of the command line switches of two configurations.
2. Open an empty text document in a text editor supporting regular expressions. I’ve used Notepad++, but you can also use Visual Studio itself by opening a new text file.
Paste the content of the All Option field to the file. Append the content of the Additional Options Field.
3. The next steps will ensure there is one option per line. Most of the switches have no spaces except the /D switch. I’ll remove it with a simple regex :
Search and Replace the regular expression
/D\s with /D :
6. Repeat the process to the other configuration you want to compare.
That’s it, the simple system saved me some guesswork when a project compiled in debug but will not compile (or link) when using release configuration.
Do you have other ways of comparing debug/release? leave a note in the comment section.