13

When you choose Debug / Attach to Process in Visual Studio, the dialog displayed has a "Title" column. By default this shows the caption of the main window belonging to the process. For example, it might display "It was a dark and stormy night - Notepad".

How can I set this field for an application that doesn't have a main window (e.g. a Windows service)?

I have multiple services running with the same executable name, and I'd like to be able to easily differentiate between them when attaching.

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380

1 Answers1

0

Put this in a batch file and it will tell you the identity of the worker process:

c:\windows\system32\inetsrv\appcmd list wp
pause

This doesn't give you a title but will identify them when attaching

jaywayco
  • 5,846
  • 6
  • 25
  • 40
  • 1
    That only works for ASP.NET worker processes -- although it does tell you which app pool (when VS only tells you the user). I'm talking about normal Windows Services. – Roger Lipscombe Dec 01 '11 at 11:40