How to Debug a Windows Service written in C# ?

Published on June 7, 2015 by abundantcode

Filed under Windows Forms

Last modified June 7, 2015

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 5543 times

Debugging a Windows Service is one of the difficult thing to do when working on developing a Windows Service project in Visual Studio .

One of the method to do the debugging is to attach the debugger to the thread and starting the Windows Service. . This might be little overhead sometimes.

How to Debug a Windows Service written in C# ?

Incase you need to debug the windows service quickly , you can use the Debugger.Break() method which will immediately take you to Visual Studio .

Debugger.Break();

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...