How to use ASSERT in a Release Configuration 
Author Message
 How to use ASSERT in a Release Configuration

My program running very slow, so I want to debug it in a release
configuration.  I use the following code in the STDAFX.H file:

#ifdef _RELEASE
 #undef ASSERT
 #define ASSERT(f) \
  do \
  { \
  if (!(f)) \
   {__asm {int 3}} \
  } while (0) \

#endif

but it can not work properly.  Can anybody give me any idea about this.
Thanks.

Jimmy



Mon, 22 Sep 2003 01:47:55 GMT  
 How to use ASSERT in a Release Configuration
why not:
#ifdef _RELEASE
 #undef ASSERT
 #define ASSERT(f) if (!(f)) {DebugBreak()}
#endif
Quote:

> My program running very slow, so I want to debug it in a release
> configuration.  I use the following code in the STDAFX.H file:

> #ifdef _RELEASE
>  #undef ASSERT
>  #define ASSERT(f) \
>   do \
>   { \
>   if (!(f)) \
>    {__asm {int 3}} \
>   } while (0) \

> #endif

> but it can not work properly.  Can anybody give me any idea about this.
> Thanks.



Mon, 22 Sep 2003 15:53:54 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ASSERT can not stop by release configuration

2. Using exit(0) in release configuration causes exception

3. Debug vs. Release configuration

4. release configuration trigger a run-time error.

5. Release configuration does not link, then it does!?!?

6. Error catching exceptions in Release configuration

7. Copy project options from debug to release configuration?

8. Debug and Release Configurations

9. Set active configuration = Release

10. Release configuration does not link, then it does!?!?

11. Release Configuration crashes APP

12. Anomaly in Release vs Debug Configurations??

 

 
Powered by phpBB® Forum Software