DEBUG flag problem

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
 
J

Jon Skeet [C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top