How to debug windows service

Step 1.

  Add the following code in what you want to debug.

System.Diagnostics.Debugger.Launch();

 

Step 2.

  Install and start the service. 

That's it.

However, other way as below url:

http://stackoverflow.com/questions/4678819/how-to-debug-windows-services-in-visual-studio

 

posted @ 2013-06-21 18:43  Vincent.Dr  阅读(265)  评论(0编辑  收藏  举报