Debug.WriteLine not working

前端 未结 13 2035
梦毁少年i
梦毁少年i 2020-12-03 03:07

In the past, perhaps versions of Visual Studio prior to the 2008 that I am using now, I would do something like this in my VB.NET code:

System.Diagnostics.De         


        
13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-03 03:18

    All good suggestions. I noticed that I don't see this tip mentioned, so I'll say it: In your app.config file, make sure you don't have a element in your trace listeners.

    You will effectively be clearing the list of trace listeners, including the default trace listener used for Debug statements.

    Here's what this would look like in your app.config file:

    
        
          
              
              
          
        
      
    

    If you want to have a placeholder for trace listeners in your app.config file, you should instead use something like this:

    
        
          
          
        
      
    

提交回复
热议问题