470,632 Members | 2,454 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,632 developers. It's quick & easy.

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

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
1 1252
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.

Similar topics

1 post views Thread by Voronkov Konstantin | last post: by
5 posts views Thread by jlea | last post: by
7 posts views Thread by Srinivasa Rao | last post: by
3 posts views Thread by Steve Franks | last post: by
1 post views Thread by Epetruk | last post: by
1 post views Thread by kurt sune | last post: by
6 posts views Thread by Andrew Rowley | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.