Debug.WriteLine() is not hit

后端 未结 5 1969
时光取名叫无心
时光取名叫无心 2021-01-07 09:01

I am debugging a Windows service (by hitting F5 in Visual Studio 2010) using the following code:

In Program.cs file:

         


        
5条回答
  •  醉话见心
    2021-01-07 09:24

    Environment.UserInteractive is not the same thing as Debug mode -- that just means that you are running it in the console instead of as a service. Make sure that your build configuration is set to Debug.

提交回复
热议问题