Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Debug View with a Windows Service

Tags:

People also ask

How do I run a Windows service in debug mode?

In the Application tab of the project's properties, set the Output type to Console Application. Choose Start Debugging (F5). To run the program as a Windows Service again, install it and start it as usual for a Windows Service.


I'm having trouble with real time debugging of a Windows service on a remote machine. This machine is behind a firewall only accessible through remote desktop. I include Debug.WriteLine statements through my code, in lieu of Console.WriteLine. Not too long ago I ran across an application from Microsoft named Debug View. It has been helpful in debugging Forms and WPF applications but it will not show the Debug.WriteLine statements for a running service. I would be extremely happy if I could see these debug statements. Is there a way to do this?

Note, the project is compiled in debug mode as I can see the debug statements in Debug View during the service installation.