

Debugging Optimized Code–New in Visual Studio 2012 - ProgC
http://randomascii.wordpress.com/2013/09/11/debugging-optimized-codenew-in-visual-studio-2012/

======
ygra
As I recently had to debug a nasty issue that only occurred in release builds
in VS2010 I would definitely have liked to know about this earlier. Almost all
the variables that were important in that case were inaccessible in the
debugger which made finding out the root of the issue quite difficult.

~~~
pjmlp
Once upon a time back when Visual C++ 5 was the latest version, I had to
convert a small application from C++ back to C, due to debugger issues.

The generated code made the debugger bork, and I really needed it for the type
of project we were doing, in terms of productivity.

So after the effort it took me to convince our teacher to deliver the project
in C++, I ended up doing it in C like everyone else in class.

------
malkia
You can globally enable this option without changing .vcxproj by adding it in
the CL or _CL_ environment variables (the former prepends options, the latter
appends)

Thanks to Geoff Chapel for it, there are plenty more undocumented options on
his site too:
[http://www.geoffchappell.com/studies/msvc/cl/cl/options/](http://www.geoffchappell.com/studies/msvc/cl/cl/options/)

