[英]How to debug multiple projects within a Visual Studio 2010 solution
I know that I can attach a currently executing process during a debug session. 我知道我可以在调试会话期间附加当前正在执行的进程。 However, I have not found yet how to debug a process that is launched from the Startup project.
但是,我还没有找到如何调试从启动项目启动的过程的方法。 I have this process being launched with a few parameters, and I would like to step in its initialization, and verify that the arguments that are being passed are correct.
我正在使用一些参数启动此过程,并且我想逐步进行初始化,并验证所传递的参数是否正确。 In other words, I would like to step into the startup process, and then, after the new process is launched make that the debugger stops in its first breakpoint.
换句话说,我想进入启动过程,然后在启动新过程之后,使调试器在其第一个断点处停止。
Can someone show me how to configure this scenario using Visual Studio 2010? 有人可以告诉我如何使用Visual Studio 2010配置此方案吗?
Thanks! 谢谢!
Your question isn't completely clear...but, one way is to insert; 您的问题尚不完全清楚……但是,一种方法是插入。 System.Diagnostics.Debugger.Break();
System.Diagnostics.Debugger.Break();
namespace ConsoleApplication1 { class Program { static void Main(string[] args) { System.Diagnostics.Debugger.Break(); 名称空间ConsoleApplication1 {类Program {静态void Main(string [] args){System.Diagnostics.Debugger.Break(); } } }
}}}
A screen will pop-up and you can attach debugger: 屏幕将弹出,您可以连接调试器:
If this isn't what you're looking for, please provide additional details 如果这不是您想要的,请提供其他详细信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.