code_junkie

Anyone experience VS2008 (inc SP1) ignoring or losing Breakpoints randomly?

Nov 12th, 2011
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public static void Main(string[] args)
  2. {
  3. if (Environment.UserInteractive)
  4. {
  5. Console.WriteLine("Starting service...");
  6. Service1 svc = new Service1();
  7. svc.OnStart(args);
  8. Console.WriteLine("Started");
  9. Console.WriteLine("");
  10. Console.WriteLine("Press any key to stop");
  11. Console.Read();
  12. Console.WriteLine("Stopping...");
  13. svc.OnStop();
  14. Console.WriteLine("Stopped, Press any key to exit");
  15. Console.Read();
  16. }
  17. else
  18. {
  19. ServiceBase.Run(new Service1());
  20. }
  21. }
Add Comment
Please, Sign In to add comment