By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,165 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,165 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Apr 12 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <ad******@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...
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

Apr 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.