1) You CAN debug the startup code (putting a break point in OnStart), you just have to be tricky about it. I do it by simply putting this code at the begining of OnStart:
Code:
#If Debug Then
' When debugging a service, you have to attach to a running process. This gives me
' time to attach for debugging to slowdown startup so I can set a breakpoint.
System.Threading.Thread.Sleep(15000)
#End If
Obviously this gives me a 15 second window in which I can attach to the process and set my breakpoint in the top of my startup code. It's not a perfect solution, but better than nothing.
2) InstallUtil is a nice, quick utility for installing and uninstalling, however it lacks some pretty substantial support for certain settings. It doesn't allow you to setup the service at all... for instance you can't have it handle the "Allow service to interact with desktop" option (which ALSO doesn't appear to be an option in the required Installer class you must add to your service) NOR can you use it to set Dependencies to make sure Windows loads your service in the proper order at startup (if you use Automatic)... someone hinted that this could be set in that installer class as well but I've not been able to find that option. The only way I've found to overcome these limitations is by either manually setting it up after installing it (not an option for dependencies), hacking the registry yourself (not a wise choice) or by using a product like InstallShield which can do it all for you quite nicely.