Define DEBUG symbol on VS2010 website?

I can not find where this parameter is

#if !DEBUG // some code #endif 

when I change the configuration drop-down menu from debug to release, I see no changes in my code, which means that my DEBUG character is undefined

EDIT

I do not see the settings on the Buid screen, as Mark points out:

enter image description here

+4
source share
3 answers

If you go to the project (website) properties, go to the "Assembly" tab and make sure Define DEBUG constant checked.

This parameter can be changed for each assembly configuration.

+2
source

If the answer "Mark" does not do this, try switching to

 #ifndef DEBUG /* ... */ #endif 

or optional

 #if !defined(DEBUG) /* ... */ #endif 

and see if that helps?

+1
source

In Web.config, change the compilation section to:

 <compilation debug="false"> 

or

 <compilation debug="true"> 

Worked for me, but it is annoying, there is no choice on the assembly screen.

+1
source

Source: https://habr.com/ru/post/1338142/


All Articles