debugging windows service: breakpoint will not currently be hit - visual-studio-2010

I have attached the process for my windows service which is running/started on my machine. In vs.net 2010 I have a few breakbpoints set in my service, but each of them says?:
'break point will not currently be hit'
what is the easiest way to get the debugging for windows services happening?

This is the correct way to debug the windows service but you should be sure that the files of the windows service are updated. I mean that whenever you build the windows service project you should stop the service, replace the windows service exe and the related dlls and then restart the windows service.

Related

Debugging a Windows service

I learned that for Windows Service Debugging in Visual Studio 2015 IDE,
launch the service from IDE using the ā€œ-cā€ command-line switch. This enables the service to run as a console application.
Why do we need to enable the service to run as a console application, in order to debug the service?
Does running as a console application here mean running as a foreground process?
Does running a service here mean running as a background daemon?
How do we debug a service, if running it normally instead of running as a console application?
Is the switch "-c" a switch of Visual Studio debugger, or of something else?
Thanks
This blog also shared us the reason why we convert a Service to Console Application for Debugging like "debug more easier" or others:
https://social.technet.microsoft.com/wiki/contents/articles/30957.c-windows-service-in-console-mode-for-debug-and-admin.aspx.
I think the command line switch would be similar to the UT project property settings.
To debug the windows Server without using the console app type, you could use the attach to process or customer code or unit tests:
https://msdn.microsoft.com/en-us/library/7a50syb3(v=vs.110).aspx
Easier way to debug a Windows service

Prevent TFS from starting at computer startup

I installed TFSE on my computer. Now I want to stop it from auto running from when I boot the computer, but I rather not uninstall it. I've checked the startup list in Task Manager but it's not there. Is there any way of stopping it from auto-starting?
First, just as Daniel says:It's not recommend to hold TFS server on your own desktop PC. If you really want it, you can install it in your Virtual machine. Install Team Foundation Server
If you just need the service and process of TFS not running. You can stop the service manually follow Stop and start services, application pools, and websites
If you want to prevent Visual Studio from connecting to Team Foundation Server on startup. Please refer this smilar question.

vb6 Windows Service Issue

I have a vb6 Windows Service which i am trying to migrate it to 2008 from 2003 server and getting the below error,
"Windows could not start the Service-03 service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion."
Is that i have to install anything to run vb6 windows service applications on windows server 2008 ?
If you start the executable directly by doubleclicking the EXE (bypassing the Windows service handling) you will get popups if there's some ressources missing.
There can be many reasons for this, your service should hace a log where you can investigate further.
Take a look at windows events, there could be more information about the problem.

Is there a regedit key in windows that blocks the running of exe files (by services)

I have a Windows Service that runs an exe file and it is working fine under Win7 and Win8 Environments. But when I try the program in a Windows Server 2008 or Windows Server 2012 Environment, the service works but the exe file is not run. So I am wondering if there is a regedit key that blocks running of exe files when they are run from Session 0 or something similar.
I have noticed that Windows 2012 by default blocks running interactive programs. But I have already allowed it by setting the following value to zero.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows
NoInteractiveServices
When you install a Windows Service in Windows Server enviorment, you need to check Allow service to interact with desktop property in the service properties -> Log On.
When this property is enabled, try to restart Interactive Services Detection service.

How to attach to and debug an ASP.NET MVC application running in Windows Azure Emulator?

I am writing an MVC 3 application to run in Windows Azure. On my local machine I use the Windows Azure emulator.
If I press F5 in my solution ("Start debugging") I'm able to put breakpoints and step through the code of my application.
Do you know if it's possible to attach to the application if it's already running (if it's been started with CTRL + F5, "Start without debugging")? If yes, how?
In ASP.NET running in IIS I just have to attach to the w3wp.exe process. How to do the same for the Windows Azure emulator?
If you are running the application in IIS (have a Sites section in your config file) then you will do it the same way with the emulator. Azure creates an Application Pool for the deployment so you will just need to attach to that w3wp.exe process.

Resources