Asp.net release build vs debug build

后端 未结 4 2070
臣服心动
臣服心动 2020-11-30 14:53

How do I determine if my app was compiled as \"release\" instead of \"debug\"? I went to VS 2008 Project Properties > Build and set the configuration from Debug to Release b

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 15:25

    For one in Web.config debug will be set to true, however you can actually set this in a release application too.

    In debug however defines like DEBUG are set, so it's simple to do:

    bool is_debug;
    
    #ifdef DEBUG
    is_debug = true;
    #else
    is_debug = false;
    #endif
    

提交回复
热议问题