Is there an easier way to step through the code than to start the service through the Windows Service Control Manager and then attaching the debugger to the thread? It\'s ki
Just paste
Debugger.Break();
any where in you code.
For Example ,
internal static class Program
{
///
/// The main entry point for the application.
///
private static void Main()
{
Debugger.Break();
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service1()
};
ServiceBase.Run(ServicesToRun);
}
}
It will hit Debugger.Break();
when you run your program.