DEBUG flag problem

  • Thread starter Thread starter Sam Kong
  • Start date Start date
S

Sam Kong

Hello!

I am using VC# 2005 Express Beta.

DEBUG flag is not automatically set when I run at debug mode

#if DEBUG
//...
#endif


If I manually set DEBUG in the project property, it works.
It used to work.

Any idea?

Sam
 
Sam Kong said:
I am using VC# 2005 Express Beta.

DEBUG flag is not automatically set when I run at debug mode

#if DEBUG
//...
#endif


If I manually set DEBUG in the project property, it works.
It used to work.

Any idea?

There are two completely separate ideas here - one is whether the DEBUG
symbol is defined when the project is built. The other is whether the
executable is run in the debugger or not. It's possible to run an
executable which has been built in release mode in the debugger, just
as it's possible to run an executable which has been built in debug
mode without attaching a debugger.
 
Back
Top