Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2007, 02:18 AM
Registered User
 
Join Date: Aug 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Debugging a WindowsServiceProgram

Hi
1-I have a problem with my windowsService Prog . i attached the program to debugger in .net . I put breakPoint on Onstart or
 Oncontuinue methodes but they didnt work . I don't understand how the program will debug and how I can understand what is happening in program?
2-what dose eventLog Tools do ?

 
Old October 29th, 2007, 08:09 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you use a library like log4net in your service application you can put extensive logging into it to determine what is going on. That's one of the critical design approaches for windows services. You need to do extensive logging as it's very difficult to debug such an application when it's launched as a service.

Are you attaching the debugger to the application instance that is started as a service? If so, I would imagine that you'll never be able to get a breakpoint on the OnStart method as you can't attach to it before it's started and when you do attach to it, it's already started. Simple case of catch 22.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Debugging fs22 Javascript 3 May 17th, 2005 10:13 AM
Debugging BSkelding VB.NET 2002/2003 Basics 1 June 16th, 2004 10:32 PM
Debugging Louisa VB.NET 2002/2003 Basics 1 March 18th, 2004 11:55 AM
Need help debugging.... reg03 Beginning PHP 5 January 27th, 2004 03:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.