How do you debug a Windows Service?

后端 未结 15 2688
春和景丽
春和景丽 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:53

    In order to attach a debugger to the Windows Service, it needs to be started first. The reason why the service failed to start can be checked in Windows Event Log.

    After that the process of attaching a debugger is pretty straight forward from Visual Studio Debug->Attach To Process.

提交回复
热议问题