473,414 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Starting a Service for Debugging

I have a windows service project as part of a multi-project solution. To
step through some of the code, I need to debug the service.

1) How do I start the service for debuging. A production version of the
service exists on the machine.
2) Can I then add breakpoints in the service code and step into the other
classes?
Nov 16 '05 #1
1 1059
Hi Tom,

You can set breakpoints and then attach to the running process by selecting
the Debug, Processes menu.

Since the process isn't available until after the Start method executes
you'll have to pull a trick (only if you want to hit a break point in the
Start method, otherwise ignore the rest of this). Add a dummy service to
your code that is installed for the same service process. When you start
the dummy service, it will load the process. After that, you can attach to
the process and will be able to hit a break point in the Start method of the
service you want to debug.

Joe
--
http://www.csharp-station.com

"Tom O'Brien" <To*******@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.com...
I have a windows service project as part of a multi-project solution. To
step through some of the code, I need to debug the service.

1) How do I start the service for debuging. A production version of the
service exists on the machine.
2) Can I then add breakpoints in the service code and step into the other
classes?

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mgonzales3 | last post by:
Hey guys I keep getting this error when i try running my vb.net windows service. -------------------------- The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The...
1
by: mtc | last post by:
I'm able to install and run a service I built on two machines - the one I built it on and another that has visual studio installed. I've installed it without problems on 3 other machines that...
6
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody see the situation when the VS refuses to debug the Web Service at all? I can't catch why, the initially created Web Service can be debugged very easy but after some changes...
3
by: Ivan G. | last post by:
Hi I'm just playing with Visual Studio 2003 trying to write simple windows service. I've created user service, installer and msi package, my cool service appeared in MMC service list. But when I...
5
by: Steve Long | last post by:
Hello, I hope this question isn't too fundamental. I have a feeling it is. I'm trying to start a winform app from a windows service written in C#. I created a class and used it from a windowsforms...
5
by: Cleyton | last post by:
Hi! I would like to know if is it possible start an application through WINDOWS SERVICE using System.Diagnostics.Process.Start()? I've tried to do this but nothing happens. Tks!
6
by: Arnie | last post by:
We're using the ServiceController class provided by the .NET Framework, programming in C#. We are using the Start() method to start a service from another service. This works fine most of the...
2
by: ssg31415926 | last post by:
I'm trying to debug a new web application and I get: "Unable to start debugging on the web server. The Visual Studio 2005 Remote Debugger service is unable to connect to this computer. Please see...
5
by: eliasen | last post by:
Hi I have created a Windows Service using C# and .NET2.0. The service is quite simple - right now it doesn't do anything except throwing an exception in the OnStart method. It used to something...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.