MC++ FAQ
Sunday 09 | 29 | 2002
MC++ and /Zi
If you compile a Managed C++ with the /Zi compiler option enabled (generate debugging information), the resulting assembly will always be marked with the DebuggableAttribute, even if you are compiling a release build with full optimizations enabled.

Unfortunately, this will usually cause the runtime to disable JIT optimizations when the application is running, reducing performance.

Update: A workaround for this is to put the following code in a header file and make sure it gets included into the build of every .OBJ file in the project:

 [assembly:System::Diagnostics::Debuggable(false, false)];

Thanks to Brandon Bray of the VC++ team for the tip!

Posted by tomasr at September 29, 2002 03:28 PM
Comments
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?

Copyright(C) 2002, Tomas Restrepo, All rights reserved. Powered by Movable Type 2.63