分享

How to debug windows service

 kittywei 2012-01-31
) Add such code to the service's entry, static Main() function,

#if DEBUG
            System.Diagnostics.Debugger.Launch();
#endif

2) install your windows service appliation with visual studio command tool. command line as follow:

installUtil.exe <Application's name>

3) Open your windows service source code with visual studio, start your windows service at service tool (you can find it at administrator's tool control panel),
then it will pop-up a dialog ask you if want to debug, select yes, that's ok, you can debug your application.

4) If you have modified your source code, you need uninstall the windows service, build your source code, reinstall agian.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多