从命令行附加Visual Studio调试器 [英] Attaching Visual Studio debugger from command line

查看:87
本文介绍了从命令行附加Visual Studio调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 vsjitdebugger.exe -p {pid} 将visual studio调试器附加到正在运行的进程。它的工作原理,但烦人的是,弹出窗口提示我选择一个调试器附加,我可以选择可视化工作室的开放实例或启动一个新的实例。是否可以传入.sln文件,我希望它附加到我没有得到那个提示?我可以选择新的实例作为默认,但我希望我可以指定一个.sln文件,以便它可以打开该解决方案或附加到它,如果它已经打开。

I'm using vsjitdebugger.exe -p {pid} to attach the visual studio debugger to a running process. It works, but with the annoyance that a popup window prompts me to select a debugger to attach and I can either choose the open instance of visual studio or start a new instance. Is it possible to pass in the .sln file I want it to attach to so that I don't get that prompt? I could choose new instance as the default, but I was hoping I could specify a .sln file so that it would either open that solution or attach to it if it's already open.

谢谢,
Greg

Thanks, Greg

编辑:
我希望以编程方式做到这一点。我的应用程序正在运行测试框架,我希望它可以运行,而无需点击任何东西。 vsjitdebugger.exe的帮助对话框没有提到我想要的是可能的。我真正想要的是执行的功能: vsjitdebugger.exe -p {pid} -s'solution.sln'并绕过该弹出窗口。

I was hoping for a programmatic way of doing this. My application is being run by a testing framework and I want it to run without having to click on anything. The help dialog for vsjitdebugger.exe doesn't mention that what I want is possible. What I really want is the ability to do: vsjitdebugger.exe -p {pid} -s 'solution.sln' and bypass that popup.

推荐答案

看看这篇文章,虽然它使用宏,你可以转换成C#或vb.net合理简单。

Have a look at this article, although it uses macro's you could convert into C# or vb.net reasonable easy.

http://www.codeproject.com/KB/macros/AttachedProcess .aspx

这篇关于从命令行附加Visual Studio调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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