I've been debugging for a quite while the Windows Service I've been working with without any noticeable problems. I used to install it thourgh the installutil
command and I was able to debug it (followed this MSDN tutorial).
Deploying the service to the production server meant so much pain in order to pack all dependencies, so I was encouraged to deploy it through some kind of installer.
Which one? "Quick and dirty" solution: Visual Studio installer
Everything is running fine until the point I needed to debug the installed server as I have been doing until now. I attach the Windows Service process but the debugger isn't stopping at my breakpoint.
What am I exactly missing?
While I was writing the question, I asked myself how did I configured the build properties. For my surprise, it was set to release
.
I changed it to debug
, uninstalled the service, installed it again and I finally had my service being debugged.
Bear in mind I always installed the service right-clicking on the project's name and clicking into "install". Seems this takes the installer placed on the specified build config.
Thing is this service is supposed to be installed uniquely on a production server. I was supposed to deploy always the release version in order to be completely clean and optimised, so I guess I will have to keep swapping this option, at least for my own workspace.
And yes, my installutil
was pointing to debug build .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.