c# - Debugging a Windows Service -


i making windows service , want debug it.

this error when try debug it:

cannot start service command line or debugger. windows service must first installed , started server explorer, windows services administrative toll or net start command.

i have installed service using installutil, still facing problems.

also, when try attach process, service goes running mode, never starts debugging.

edit: have reinstall windows service everytime make change or building suffice?

in onstart use this:

#if debug if(!system.diagnostics.debugger.isattached)    system.diagnostics.debugger.launch(); #endif 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -