) 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.
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。