Home > Enterprise >  Debugging Windows service on Remote Server in VS2019
Debugging Windows service on Remote Server in VS2019

Time:11-22

I have deployed some Windows services application on my server. but something wrong occur and i need to debug that windows services in my computer on VS2019. how i can do that.? please give some clue. thanks

this is the application logs

Service is started at 11/18/2021 7:48:16 PM

Service is stopped at 11/18/2021 7:50:57 PM

Service is started at 11/18/2021 7:51:48 PM

Service is stopped at 11/18/2021 7:53:19 PM

Service is started at 11/18/2021 8:07:08 PM

Service is recall at : 11/18/2021 8:09:00 PM

Service is recall at : 11/18/2021 8:10:46 PM

Service is stopped at 11/18/2021 8:11:55 PM

CodePudding user response:

There are plenty of ways. I suggest you go with the simplest method first. i.e. using try catch block.

Use multiple try catches as per the need of your code and in the catch block mention a meaningful message to know where exactly the exception was thrown and for what reason.

CodePudding user response:

Based on @BhushanMuttha clue. i have figured out what the specific issue. and i have figured out to the solution. thanks for your help.

the issue is.. my Windows services application cannot start the bat file. so i just change my method from windows service to console application that can starting up when the OS start

  • Related