#If DEBUG is ignored (VB.net or C#)

前端 未结 8 1049
青春惊慌失措
青春惊慌失措 2021-02-05 13:33

I have several of these in my code which have been working fine so far:

#If DEBUG Then    
   ... some code here       
#End If     

Now, i am

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 14:13

    Under Project Properties / Compile / Advanced Compile Options there is a checkbox called "Define Debug Constant" that sets this.

    Check out: http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_24658238.html

    EDIT: Try this initializing with this:

    #If CONFIG = "Debug" Then
    #CONST DEBUG = true
    
    #if CONFIG = "Release" Then
    #CONST DEBUG = false
    

提交回复
热议问题