Attaching Visual Studio debugger to Windows service — “attach” greyed out

I usually have the same issue and I take care of it by adding a boolean to my configuration that triggers a debug launch. You can launch a Visual Studio debugger instance that attaches to your Windows service process by calling this:

System.Diagnostics.Debugger.Launch();

What’s nice is that you can call it wherever you wish in your code.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)