Setting the “Title” value displayed in Visual Studio's “Attach to Process” dialog?

旧城冷巷雨未停 提交于 2019-12-06 18:55:47

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/5326046/setting-the-title-value-displayed-in-visual-studios-attach-to-process-dialo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!