简体   繁体   English

如何在Visual Studio 2010解决方案中调试多个项目

[英]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: 屏幕将弹出,您可以连接调试器:

弹出

  1. Click Debug 点击调试
  2. Select instance of VS2010 you'd like to use (for example, use the one that has your solution open). 选择您要使用的VS2010实例(例如,使用打开解决方案的实例)。

If this isn't what you're looking for, please provide additional details 如果这不是您想要的,请提供其他详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2010 1 个解决方案中的 2 个项目 - Visual Studio 2010 2 projects in 1 solution 在1个解决方案中的多个项目之间共享资源。 Visual Studio 2010 - Share Resources Across Multiple Projects In 1 Solution. Visual Studio 2010 在Visual Studio 2010中同时将多个项目添加到单个解决方案 - Adding multiple projects to a single solution simultaneously in Visual Studio 2010 使用文本编辑器创建具有多个项目的Visual Studio 2010解决方案 - Create a Visual Studio 2010 Solution with multiple projects from a text editor 如何在Visual Studio 2010中打开多个项目 - How to open multiple projects in Visual Studio 2010 Visual Studio 2010:如何在解决方案中强制执行项目的构建顺序? - Visual Studio 2010: How to enforce build order of projects in a solution? 将多个项目的多个存储库组合到Visual Studio 2010中的总体解决方案的单个存储库中? - Combining multiple repositories of multiple projects into a single repository of an over-arching solution in Visual Studio 2010? 如何在Visual Studio 2010中从Linux进行远程编译和调试 - How to remotely compile and debug in Linux from within Visual Studio 2010 Visual Studio解决方案添加多个项目 - Visual studio solution adding multiple projects Visual Studio解决方案“设计”用于多个项目 - Visual Studio solution “design” for multiple projects
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM