Friday, August 17, 2018

Where is C++ /Zo in Visual Studio 2013 Update 3

http://www.visualstudio.com/news/2014-aug-4-vs

Mentions a new compiler switch for better debugging with optimizations on but I can't for the life of me find it.

Does anyone know where it is and how to turn it on?

C++

/Zo Compiler Switch

/Zo is a compiler switch that generates richer debugging information for optimized code (non /Od builds). This includes improved support for debugging local variables. (Minimum edition: Express)

Solved

See the documentation on MSDN here: /Zo (Enhance Optimized Debugging). For command-line builds, just add /Zo to the build commands. To add /Zo to a project in Visual Studio, open the Property Pages dialog for the project, and navigate to Configuration Properties > C/C++ > Command Line in the tree view control. Add /Zo to the Additional Options edit box, then click OK. You should be good to go. New options like this usually don't get added to the Project Properties dialog UI until the next major revision, so you have to use the Additional Options box to see them in action.

Note that there are some incompatible options such as native Edit and Continue, but that's an unusual thing to do in Release mode anyway.


No comments:

Post a Comment