How do you debug a Windows Service?

后端 未结 15 2796
春和景丽
春和景丽 2020-12-12 21:07

I read the MSDN article on the topic. To quote:

Because a service must be run from within the context of the Services Control Manager rather than

15条回答
  •  感情败类
    2020-12-12 21:45

    Use following Code in Service OnStart Method:

    System.Diagnostics.Debugger.Launch();
    

    Choose Visual Studio option from Pop Up message

提交回复
热议问题