How should you disable all types of optimizations while debugging in VS2010?
There should be none or at least less optimization going on in a debug build. Check your buildsettings for more options.