Re: Release Configuration in Managed C++ does not suppress Debug Class

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Unfortunately not. Here is the doc [1]:

"To enable debugging in C#, add the /d:DEBUG flag to the compiler command
line when you compile your code, or add #define DEBUG to the top of your
file. In Visual Basic, add the /d:DEBUG=True flag to the compiler command
line. To provide equivalent functionality in C++, you must enclose calls to
methods of this class in a #ifdef DEBUG... #endif block. This syntax is
compiler-specific. If you are using a compiler other than the ones specified
above, you must refer to the compiler's documentation to enable conditional
compiling because of the conditional compilation attributes placed on the
methods of Debug.

"

Marcus Heege
www.heege.net


"adhingra" <adhingra@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8F204891-C93C-46EC-9047-2FEB50F6FC62@xxxxxxxxxxxxxxxx
I stumbled upon something which does not make sense "Debug class methods
are
not automatically suppressed by the managed c++ compiler when the project
is
build in release mode"

Create a a Project (Windiows Forms or Console) in VS2005 using Managed
C++
and put a Debug:;Assert(false) or Debug::Writeline("test") in there and
then
compile in Debug and release Configurations. The result is the same in
both.
Debug class calls are not automatically suppressed in release
configuration.

Is there some project setting that i need to set to get this to work? Any
help here is appreciated

thx
ashoo


.



Relevant Pages

  • Re: debugging in release mode
    ... I have no doubt that it's a problem of mine and not of the compiler. ... I don't really need optimization ... for the sake of memory space or execution speed. ... shows the differences between the default debug mode and the default release ...
    (microsoft.public.vc.mfc)
  • Re: Whats more important optimisations or debugging?
    ... aiming to make high level debugging as accurate and complete as ... oriented debug chain is appropriate. ... But in either case, barring chip and compiler bugs, the bugs ...
    (comp.arch.embedded)
  • Re: If Statement Variations
    ... You can also get to the help files for the conditional Const statement by typing #Const in any code window and, with the text cursor in or next to it, press F1. ... the & character forces the compiler to use a Long ... it simpler to switch to and from debug and testing and production ...
    (microsoft.public.excel.programming)
  • Re: Output dll bigger with VS 2005
    ... This is the first part of the map file of a debug dll compiled with VS2005 ... For a little more information on the .map files I recommend this article ... Microsoft Windows CE Compiler Team ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: If Statement Variations
    ... the & character forces the compiler to use a Long ... It is required for some calculations whose inputs and result ... overflow a short Integer. ... it simpler to switch to and from debug and testing and production ...
    (microsoft.public.excel.programming)