本文介绍了在Visual Studio中调试项目的多个实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio(VS)中有一个项目,我需要使用不同的参数启动两次.这两个实例进行通信,我需要将调试器附加到这两个实例上.

I have a project in Visual Studio (VS) which I need to launch twice with different args. These 2 instances communicate and I need the debugger attached to both.

当前我:

  • 按F5键以调试模式启动一个实例
  • Manullay从构建输出中运行 .exe 以启动第二个实例
  • 在VS中,转到 Debug -> Attach to Process ->选择第二个实例
  • Hit F5 launching one instance in debug mode
  • Manullay run the .exe from the build output to start second instance
  • In VS go to Debug -> Attach to Process -> choose second instance

是否可以将Visual Studio配置为启动2个实例?

Is there a way to configure Visual Studio to launch 2 instances?

如果没有,我有什么办法可以缩短时间(使用powershell或批处理脚本等)?

If not, is there any way I can shorten the time (using powershell or batch scripting etc.)?

注意:有时我会调试2个以上的实例.使我的问题更加复杂

推荐答案

如果要调试同一项目的多个实例,则可以运行Visual Studio的多个实例,并在不同的Visual Studio中运行每个实例.不太舒服,但是可以帮忙

If you want to debug multiple instances of the same project, you can run multiple instances of the Visual studio, and run each one in different Visual Studio. It's not very comfortable, but it can helps

这篇关于在Visual Studio中调试项目的多个实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 20:07
查看更多