Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio c# remote debugging closes windows service

Im debugging my windows service occasionally from my computer when in fact the windows service is in a different far server. Im using the visual studio remote debugger to do so and then attaching my source to the service by connecting to the server via the

tools -> attach to process -> qualifier = server ip

The issue is that whenever I lose connection with the server due to internet error or etc, the windows server stops and shuts down in my server and I have to start it again.

Perhaps I haven't provided enough information, so please ask for it instead of down vote.

TIA.

like image 333
Ori Refael Avatar asked Nov 10 '22 02:11

Ori Refael


1 Answers

Check Event Viewer on the remote server. There should be an entry in the Application log if the service crashed. If you need more details, you can have Windows Error Reporter capture a crash dump when the service crashes. Details are here: http://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx

GitHub recommends this as debugging procedure for their Windows client. You can grab the .reg file from here and tweak it to match your path/executable. https://help.github.com/articles/getting-a-crash-dump/

Then you can bring the .dmp file to your machine and inspect it in Visual Studio / Windbg/SOS http://msdn.microsoft.com/en-us/library/d5zhxt22.aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff540665(v=vs.85).aspx

like image 122
scottt732 Avatar answered Nov 14 '22 23:11

scottt732