设置“标题".在Visual Studio的“附加到流程"中显示的值对话? [英] Setting the "Title" value displayed in Visual Studio's "Attach to Process" dialog?

查看:159
本文介绍了设置“标题".在Visual Studio的“附加到流程"中显示的值对话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中选择调试"/附加到进程"时,显示的对话框具有标题"列.默认情况下,这显示了属于该进程的主窗口的标题.例如,它可能显示这是一个漆黑而暴风雨的夜晚-记事本".

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".

如何为没有主窗口的应用程序(例如Windows服务)设置此字段?

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.

推荐答案

将其放入批处理文件中,它将告诉您工作进程的身份:

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

这篇关于设置“标题".在Visual Studio的“附加到流程"中显示的值对话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆