How should you disable all types of optimizations while debugging in VS2010?
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > C/C++ > Optimization property page. Modify the Optimization property.
The gcc option -O enables different levels of optimization. Use -O0 to disable them and use -S to output assembly.
To insure optimizations are off, right click on your project -> Properties -> Configuration Properties -> C/C++ -> Optimization -> Optimization = Disabled. This is the /Od compiler switch.
Select the menu item Project->Properties
.
Under Configuration Properties->C/C++->Optimization
, in the Optimization
field, select disabled
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With