I want to debug window service. What should i write in main() to enable debugging in window service. I am developing window service using C#.
#if(DEBUG)
System.Diagnostics.Debugger.Break();
this.OnStart(null);
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
#else
ServiceBase.Run(this);
#endif
i wrote above code segment but on line (this